Skip to content

Commit

Permalink
Improve compiler symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsangfl committed Jan 7, 2024
1 parent 13c8e2e commit 9374d70
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Data.SqlClient;
using System.IO;
#if !NET6_0 && !NET8_0
#if !NET6_0_OR_GREATER
using System.Web.Hosting;
#endif

Expand Down Expand Up @@ -33,7 +33,7 @@ private static string GetDBFileCore(string fileName)
return Path.Combine(Directory.GetCurrentDirectory(), fileName);

// If path is not relative to working directory then check if it is a virtual path
#if NET6_0 || NET8_0
#if NET6_0_OR_GREATER
// Relative directoy when running in website project folder
string mappedPath = fileName.Replace("~/", "../WebsiteFullTrust/");
if (File.Exists(mappedPath))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public ObjectContextInstantiationScenarios()
}
}

#if !NET6_0 && !NET8_0
#if !NET6_0_OR_GREATER
/// <summary>
/// This class is used to test instantiation errors at code gen
/// </summary>
Expand All @@ -44,7 +44,7 @@ public ObjectContextInheritanceScenarios()
}
}

#if !NET6_0 && !NET8_0
#if !NET6_0_OR_GREATER
/// <summary>
/// This class is used to make sure one can inherit from DataContext and BO wizard still works.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
using System.Threading;
using DataModels.ScenarioModels;

#if !NET6_0 && !NET8_0
#if !NET6_0_OR_GREATER
using DataTests.AdventureWorks.LTS;
using OpenRiaServices.LinqToSql;
using System.Web;
Expand Down Expand Up @@ -200,7 +200,7 @@ public class NonDomainService
}
}

#if !NET6_0 && !NET8_0
#if !NET6_0_OR_GREATER
/// <summary>
/// This domain service attempts to declare L2S description provider with EF context
/// </summary>
Expand Down Expand Up @@ -268,7 +268,7 @@ public IQueryable<A> GetProducts()
}
}

#if !NET6_0 && !NET8_0
#if !NET6_0_OR_GREATER
/// <summary>
/// This mock LINQ to SQL DomainService throws an exception in its constructor
/// </summary>
Expand Down Expand Up @@ -1096,7 +1096,7 @@ public IEnumerable<A> GetAsReturnNull()
public IQueryable<TestSideEffects> CreateAndGetSideEffectsObjects(string name, [InjectParameter] HttpContext httpContext)
{
HttpRequest request = httpContext.Request;
#if NET6_0 || NET8_0
#if NET6_0_OR_GREATER
string verb = request.Method;
var url = new Uri ("http://" + request.Host.ToString() + request.Path.ToString() + request.QueryString.ToString());
#else
Expand Down Expand Up @@ -2114,7 +2114,7 @@ public TestEnum ReturnsEnum_Online(TestEnum value)
[Invoke(HasSideEffects = true)]
public string ReturnHttpMethodWithSideEffects_Online([InjectParameter] HttpContext httpContext)
{
#if NET6_0 || NET8_0
#if NET6_0_OR_GREATER
return httpContext.Request.Method;
#else
return httpContext.Request.HttpMethod;
Expand All @@ -2124,7 +2124,7 @@ public string ReturnHttpMethodWithSideEffects_Online([InjectParameter] HttpConte
[Invoke(HasSideEffects = false)]
public string ReturnHttpMethodWithoutSideEffects_Online([InjectParameter] HttpContext httpContext)
{
#if NET6_0 || NET8_0
#if NET6_0_OR_GREATER
return httpContext.Request.Method;
#else
return httpContext.Request.HttpMethod;
Expand Down

0 comments on commit 9374d70

Please sign in to comment.