cleanup some #if for NETSTANDARD1_3

This commit is contained in:
Stef Heyenrath
2025-08-31 11:07:25 +02:00
parent 5c221ff4fa
commit bb561c94d0
17 changed files with 67 additions and 65 deletions

View File

@@ -24,7 +24,7 @@ internal static class WireMockHandlebarsHelpers
GetBaseDirectory(),
};
#if !NETSTANDARD1_3_OR_GREATER
//#if !NETSTANDARD1_3_OR_GREATER
void Add(string? path, ICollection<string> customHelperPaths)
{
if (!string.IsNullOrEmpty(path))
@@ -36,7 +36,7 @@ internal static class WireMockHandlebarsHelpers
Add(Path.GetDirectoryName(System.Reflection.Assembly.GetCallingAssembly().Location), paths);
Add(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), paths);
Add(Path.GetDirectoryName(System.Diagnostics.Process.GetCurrentProcess().MainModule?.FileName), paths);
#endif
//#endif
o.CustomHelperPaths = paths;
o.CustomHelpers = new Dictionary<string, IHelpers>();
@@ -49,7 +49,7 @@ internal static class WireMockHandlebarsHelpers
private static string GetBaseDirectory()
{
#if NETSTANDARD1_3_OR_GREATER || NET6_0_OR_GREATER
#if NET8_0_OR_GREATER
return AppContext.BaseDirectory.TrimEnd(Path.DirectorySeparatorChar);
#else
return AppDomain.CurrentDomain.BaseDirectory.TrimEnd(Path.DirectorySeparatorChar);