mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-22 09:30:18 +01:00
cleanup some #if for NETSTANDARD1_3
This commit is contained in:
@@ -10,9 +10,9 @@ namespace WireMock.RegularExpressions;
|
||||
/// <summary>
|
||||
/// Extension to the <see cref="Regex"/> object, adding support for GUID tokens for matching on.
|
||||
/// </summary>
|
||||
#if !NETSTANDARD1_3
|
||||
//#if !NETSTANDARD1_3
|
||||
[Serializable]
|
||||
#endif
|
||||
//#endif
|
||||
internal class RegexExtended : Regex
|
||||
{
|
||||
/// <inheritdoc cref="Regex"/>
|
||||
@@ -32,7 +32,7 @@ internal class RegexExtended : Regex
|
||||
{
|
||||
}
|
||||
|
||||
#if !NETSTANDARD1_3 && !NET8_0_OR_GREATER
|
||||
#if !NET8_0_OR_GREATER
|
||||
/// <inheritdoc cref="Regex"/>
|
||||
protected RegexExtended(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) :
|
||||
base(info, context)
|
||||
|
||||
@@ -23,9 +23,9 @@ internal static class CompressionUtils
|
||||
using var zipStream = Create(contentEncoding, compressedStream, CompressionMode.Compress);
|
||||
zipStream.Write(data, 0, data.Length);
|
||||
|
||||
#if !NETSTANDARD1_3
|
||||
//#if !NETSTANDARD1_3
|
||||
zipStream.Close();
|
||||
#endif
|
||||
//#endif
|
||||
return compressedStream.ToArray();
|
||||
}
|
||||
|
||||
|
||||
@@ -142,16 +142,16 @@ internal static class TypeLoader
|
||||
|
||||
private static bool TryFindTypeInDlls<TInterface>(string? implementationTypeFullName, [NotNullWhen(true)] out Type? pluginType) where TInterface : class
|
||||
{
|
||||
#if NETSTANDARD1_3
|
||||
var directoriesToSearch = new[] { AppContext.BaseDirectory };
|
||||
#else
|
||||
//#if NETSTANDARD1_3
|
||||
// var directoriesToSearch = new[] { AppContext.BaseDirectory };
|
||||
//#else
|
||||
var processDirectory = Path.GetDirectoryName(System.Diagnostics.Process.GetCurrentProcess().MainModule?.FileName);
|
||||
var assemblyDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||
var directoriesToSearch = new[] { processDirectory, assemblyDirectory }
|
||||
.Where(d => !string.IsNullOrEmpty(d))
|
||||
.Distinct()
|
||||
.ToArray();
|
||||
#endif
|
||||
//#endif
|
||||
foreach (var directory in directoriesToSearch)
|
||||
{
|
||||
foreach (var file in Directory.GetFiles(directory!, "*.dll"))
|
||||
|
||||
@@ -43,7 +43,8 @@
|
||||
</PropertyGroup>-->
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Polyfill" Version="8.8.0">
|
||||
<!-- Keep at 6.14.0 -->
|
||||
<PackageReference Include="Polyfill" Version="6.14.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
||||
Reference in New Issue
Block a user