From 3f4539d9439e4893058f5a46043faea611ef0df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=A7=D8=AD=D8=B3=D8=A7=D9=86=20=D9=88=D9=84=DB=8C?= Date: Sun, 7 Jan 2024 17:39:10 +0330 Subject: [PATCH] Improve debugging symbols --- .../DBImager.cs | 4 ++-- .../ScenarioModels/ContextInstantiationScenarios.cs | 4 ++-- .../Mocks/MockDomainServices.cs | 12 ++++++------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/DBImager.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/DBImager.cs index 505db2ea..03b2afd1 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/DBImager.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/DBImager.cs @@ -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 @@ -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)) diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/DataModels/ScenarioModels/ContextInstantiationScenarios.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/DataModels/ScenarioModels/ContextInstantiationScenarios.cs index 77e2d5e2..61f34d0f 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/DataModels/ScenarioModels/ContextInstantiationScenarios.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/DataModels/ScenarioModels/ContextInstantiationScenarios.cs @@ -17,7 +17,7 @@ public ObjectContextInstantiationScenarios() } } -#if !NET6_0 && !NET8_0 +#if !NET6_0_OR_GREATER /// /// This class is used to test instantiation errors at code gen /// @@ -44,7 +44,7 @@ public ObjectContextInheritanceScenarios() } } -#if !NET6_0 && !NET8_0 +#if !NET6_0_OR_GREATER /// /// This class is used to make sure one can inherit from DataContext and BO wizard still works. /// diff --git a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Mocks/MockDomainServices.cs b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Mocks/MockDomainServices.cs index 181ff254..46332485 100644 --- a/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Mocks/MockDomainServices.cs +++ b/src/Test/Desktop/OpenRiaServices.Common.DomainServices.Test/Mocks/MockDomainServices.cs @@ -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; @@ -200,7 +200,7 @@ public class NonDomainService } } -#if !NET6_0 && !NET8_0 +#if !NET6_0_OR_GREATER /// /// This domain service attempts to declare L2S description provider with EF context /// @@ -268,7 +268,7 @@ public IQueryable GetProducts() } } -#if !NET6_0 && !NET8_0 +#if !NET6_0_OR_GREATER /// /// This mock LINQ to SQL DomainService throws an exception in its constructor /// @@ -1096,7 +1096,7 @@ public IEnumerable GetAsReturnNull() public IQueryable 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 @@ -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; @@ -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;