Replace tfm based constants with SDK ones (dotnet/corefx#41601)
authorEriawan Kusumawardhono <eriawan@live.com>
Tue, 15 Oct 2019 17:11:40 +0000 (00:11 +0700)
committerViktor Hofer <viktor.hofer@microsoft.com>
Tue, 15 Oct 2019 17:11:40 +0000 (19:11 +0200)
* replace DefineConstants with SDK ones

Commit migrated from https://github.com/dotnet/corefx/commit/2133679ff62222ba2734232ab8fa4c65765e82a2

149 files changed:
docs/libraries/coding-guidelines/package-projects.md
src/libraries/Common/src/Interop/Windows/SspiCli/SSPIWrapper.cs
src/libraries/Common/src/System/Drawing/KnownColor.cs
src/libraries/Common/src/System/Net/Security/NegotiateStreamPal.Windows.cs
src/libraries/Common/src/System/Net/SecurityProtocol.cs
src/libraries/Common/src/System/Runtime/InteropServices/FunctionWrapper.cs
src/libraries/Common/src/System/Security/Cryptography/Asn1Reader/AsnCharacterStringEncodings.cs
src/libraries/Common/src/System/Security/Cryptography/Asn1Reader/AsnWriter.BitString.cs
src/libraries/Common/src/System/Security/Cryptography/CryptoPool.cs
src/libraries/Common/tests/CoreFx.Private.TestUtilities/System/PlatformDetection.cs
src/libraries/Common/tests/System/IO/Compression/ZipTestHelper.cs
src/libraries/Common/tests/System/Net/Http/LoopbackServer.cs
src/libraries/Common/tests/System/Net/SslProtocolSupport.cs
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/DSA/DSASignVerify.cs
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/CurveDef.cs
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/EccTestBase.cs
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanFactory.cs
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Hash.cs
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Hmac.cs
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.ImportExport.cs
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.NistValidation.cs
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.Tls.cs
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.cs
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaFactory.cs
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaImportExport.cs
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaStub.cs
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTests.NistValidation.cs
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDsa/ECDsaTestsBase.cs
src/libraries/Directory.Build.props
src/libraries/System.Collections.Immutable/ref/System.Collections.Immutable.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Builder.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.Minimal.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableArray_1.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableDictionary_2.HashBucket.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableHashSet_1.HashBucket.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Builder.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.Node.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableList_1.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableQueue_1.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.Builder.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.Node.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedDictionary_2.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.Builder.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.Node.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableSortedSet_1.cs
src/libraries/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableStack_1.cs
src/libraries/System.Collections.Immutable/tests/ImmutableListTest.cs
src/libraries/System.Data.SqlClient/src/System.Data.SqlClient.csproj
src/libraries/System.Data.SqlClient/src/System/Data/Common/DbConnectionStringCommon.cs
src/libraries/System.Data.SqlClient/src/System/Data/SqlClient/SNI/SNIProxy.cs
src/libraries/System.Data.SqlClient/src/System/Data/SqlClient/SqlConnectionString.cs
src/libraries/System.Data.SqlClient/src/System/Data/SqlClient/SqlConnectionStringBuilder.cs
src/libraries/System.Data.SqlClient/src/System/Data/SqlClient/TdsValueSetter.cs
src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterLib.cs
src/libraries/System.Drawing.Common/ref/System.Drawing.Common.cs
src/libraries/System.Drawing.Common/src/System.Drawing.Common.csproj
src/libraries/System.Drawing.Common/src/System/Drawing/Bitmap.Unix.cs
src/libraries/System.Drawing.Common/src/System/Drawing/Font.Unix.cs
src/libraries/System.Drawing.Common/src/System/Drawing/Font.cs
src/libraries/System.Drawing.Common/src/System/Drawing/GdiPlusStreamHelper.Unix.cs
src/libraries/System.Drawing.Common/src/System/Drawing/GdiplusNative.Unix.cs
src/libraries/System.Drawing.Common/src/System/Drawing/Icon.Unix.cs
src/libraries/System.Drawing.Common/src/System/Drawing/Icon.Windows.cs
src/libraries/System.Drawing.Common/src/System/Drawing/Image.Unix.cs
src/libraries/System.Drawing.Common/src/System/Drawing/Image.cs
src/libraries/System.Drawing.Common/src/System/Drawing/Imaging/ImageFormat.cs
src/libraries/System.Drawing.Common/src/System/Drawing/Imaging/Metafile.Unix.cs
src/libraries/System.Drawing.Common/src/System/Drawing/Internal/GPStream.cs
src/libraries/System.Drawing.Common/src/System/Drawing/Printing/Margins.cs
src/libraries/System.Drawing.Common/src/System/Drawing/Printing/PrintDocument.Unix.cs
src/libraries/System.Drawing.Common/src/System/Drawing/Printing/PrintingServices.Unix.cs
src/libraries/System.Drawing.Common/src/System/Drawing/SystemIcons.Unix.cs
src/libraries/System.Globalization/tests/System/Globalization/CharUnicodeInfoTests.cs
src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/PipeAwaitable.cs
src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/PipeReaderStream.cs
src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/PipeWriterStream.cs
src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/StreamPipeWriter.cs
src/libraries/System.IO.Pipelines/tests/Infrastructure/CancelledReadsStream.cs
src/libraries/System.IO.Pipelines/tests/Infrastructure/CancelledWritesStream.cs
src/libraries/System.IO.Pipelines/tests/Infrastructure/ThrowAfterNWritesStream.cs
src/libraries/System.IO.Pipelines/tests/StreamPipeReaderTests.cs
src/libraries/System.IO.Pipelines/tests/StreamPipeWriterTests.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Decompression.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTestBase.cs
src/libraries/System.Net.Http/tests/FunctionalTests/PlatformHandlerTest.cs
src/libraries/System.Net.Http/tests/FunctionalTests/TestHelper.cs
src/libraries/System.Net.WebSockets/tests/WebSocketTests.cs
src/libraries/System.Reflection.DispatchProxy/tests/DispatchProxyTests.cs
src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.cs
src/libraries/System.Reflection.Metadata/ref/System.Reflection.Metadata.csproj
src/libraries/System.Reflection.Metadata/src/System.Reflection.Metadata.csproj
src/libraries/System.Reflection.Metadata/src/System/Reflection/Internal/MemoryBlocks/MemoryMappedFileBlock.cs
src/libraries/System.Reflection.Metadata/src/System/Reflection/Internal/MemoryBlocks/NativeHeapMemoryBlock.cs
src/libraries/System.Reflection.Metadata/src/System/Reflection/Internal/Utilities/PinnedObject.cs
src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Internal/VirtualHeap.cs
src/libraries/System.Reflection.MetadataLoadContext/tests/src/TestUtils/NetStandardBridge.cs
src/libraries/System.Reflection/tests/AssemblyTests.cs
src/libraries/System.Resources.ResourceManager/tests/ResourceManagerTests.cs
src/libraries/System.Runtime.Caching/src/System/Runtime/Caching/SRef.cs
src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/StringMarshalingTests.cs
src/libraries/System.Runtime.Serialization.Formatters/tests/BinaryFormatterTestData.cs
src/libraries/System.Runtime.Serialization.Formatters/tests/EqualityExtensions.cs
src/libraries/System.Runtime.WindowsRuntime/src/System/Resources/WindowsRuntimeResourceManager.cs
src/libraries/System.Runtime/tests/System/ActivatorTests.cs
src/libraries/System.Runtime/tests/System/EnumTests.cs
src/libraries/System.Runtime/tests/System/EnumTests.netcoreapp.cs
src/libraries/System.Security.Cryptography.Algorithms/tests/DefaultDSAProvider.cs
src/libraries/System.Security.Cryptography.Algorithms/tests/DefaultECDsaProvider.cs
src/libraries/System.Security.Cryptography.Algorithms/tests/DefaultRSAProvider.cs
src/libraries/System.Security.Cryptography.Algorithms/tests/Rfc2898Tests.cs
src/libraries/System.Security.Cryptography.Cng/tests/ECDiffieHellmanCngProvider.cs
src/libraries/System.Security.Cryptography.Cng/tests/ECDiffieHellmanCngTests.cs
src/libraries/System.Security.Cryptography.Cng/tests/ECDsaCngImportExportTests.cs
src/libraries/System.Security.Cryptography.Cng/tests/ECDsaCngProvider.cs
src/libraries/System.Security.Cryptography.Cng/tests/ECDsaCngTests.cs
src/libraries/System.Security.Cryptography.Cng/tests/HandleTests.cs
src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.KeyTrans.cs
src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/Pal/AnyOS/ManagedPal.cs
src/libraries/System.Security.Cryptography.Pkcs/src/Internal/Cryptography/PkcsHelpers.cs
src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsRecipient.cs
src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSignature.DSA.cs
src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSignature.ECDsa.cs
src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSignature.RSA.cs
src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSignature.cs
src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/CmsSigner.cs
src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/SignerInfo.cs
src/libraries/System.Security.Cryptography.Pkcs/tests/CertLoader.cs
src/libraries/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/DecryptTests.cs
src/libraries/System.Security.Cryptography.Pkcs/tests/EnvelopedCms/StateTests.cs
src/libraries/System.Security.Cryptography.Pkcs/tests/SignedCms/SignedCmsTests.cs
src/libraries/System.Security.Cryptography.Pkcs/tests/SignedCms/SignedCmsWholeDocumentTests.cs
src/libraries/System.Security.Cryptography.Pkcs/tests/SignedCms/SignerInfoTests.cs
src/libraries/System.Security.Cryptography.Primitives/tests/AsymmetricAlgorithm/Trivial.cs
src/libraries/System.Security.Cryptography.Primitives/tests/CryptoStream.cs
src/libraries/System.Security.Cryptography.X509Certificates/tests/CertificateCreation/CertificateRequestUsageTests.cs
src/libraries/System.Security.Cryptography.X509Certificates/tests/X509StoreTests.cs
src/libraries/System.Security.Permissions/ref/System.Security.Permissions.Forwards.cs
src/libraries/System.Security.Permissions/ref/System.Security.Permissions.cs
src/libraries/System.Security.Principal.Windows/src/System/Security/Principal/SID.cs
src/libraries/System.Security.Principal.Windows/tests/WellKnownSidTypeTests.cs
src/libraries/System.Text.Json/src/System.Text.Json.csproj
src/libraries/System.Text.Json/src/System/Text/Json/JsonHelpers.cs
src/libraries/System.Text.Json/tests/JsonPropertyTests.cs
src/libraries/System.Text.Json/tests/JsonTestHelper.cs
src/libraries/System.Text.Json/tests/Utf8JsonWriterTests.cs
src/libraries/System.ValueTuple/tests/ValueTupleTests.cs
src/libraries/mscorlib.WinRT-Facade/ref/TypeForwards.cs
src/libraries/mscorlib.WinRT-Facade/ref/mscorlib.WinRT-Facade.csproj
src/libraries/shims/manual/System.Data.forwards.cs

index c6594d3..81b5e8c 100644 (file)
@@ -110,7 +110,7 @@ Sample \ref .builds file defining a constant used to filter API that were added
 Conditional compilation using the above-mentioned constant (from `ref\System.Net.Security.cs`):
 
 ```
-#if netcoreapp11
+#if NETCOREAPP
         public virtual void AuthenticateAsClient(string targetHost, System.Security.Cryptography.X509Certificates.X509CertificateCollection clientCertificates, bool checkCertificateRevocation) { }
 #endif
 ```
index 524ece3..30d7051 100644 (file)
@@ -374,7 +374,7 @@ namespace System.Net
             if (NetEventSource.IsEnabled) NetEventSource.Enter(null, contextAttribute);
 
             Span<T> span =
-#if netstandard
+#if NETSTANDARD2_0
                 stackalloc T[1] { attribute };
 #else
                 MemoryMarshal.CreateSpan(ref attribute, 1);
@@ -384,7 +384,7 @@ namespace System.Net
                 MemoryMarshal.AsBytes(span),
                 null,
                 out SafeHandle sspiHandle);
-#if netstandard
+#if NETSTANDARD2_0
             attribute = span[0];
 #endif
 
@@ -406,7 +406,7 @@ namespace System.Net
             if (NetEventSource.IsEnabled) NetEventSource.Enter(null, contextAttribute);
 
             Span<T> span =
-#if netstandard
+#if NETSTANDARD2_0
                 stackalloc T[1] { attribute };
 #else
                 MemoryMarshal.CreateSpan(ref attribute, 1);
@@ -416,7 +416,7 @@ namespace System.Net
                 MemoryMarshal.AsBytes(span),
                 safeHandleType,
                 out sspiHandle);
-#if netstandard
+#if NETSTANDARD2_0
             attribute = span[0];
 #endif
 
@@ -488,7 +488,7 @@ namespace System.Net
             if (NetEventSource.IsEnabled) NetEventSource.Enter(null);
 
             Span<Interop.SspiCli.SecPkgContext_IssuerListInfoEx> buffer =
-#if netstandard
+#if NETSTANDARD2_0
                 stackalloc Interop.SspiCli.SecPkgContext_IssuerListInfoEx[1] { ctx };
 #else
                 MemoryMarshal.CreateSpan(ref ctx, 1);
@@ -499,7 +499,7 @@ namespace System.Net
                 MemoryMarshal.AsBytes(buffer),
                 typeof(SafeFreeContextBuffer),
                 out sspiHandle);
-#if netstandard
+#if NETSTANDARD2_0
             ctx = buffer[0];
 #endif
 
index ce2db64..f429786 100644 (file)
@@ -9,7 +9,7 @@ namespace System.Drawing
 {
     [SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue")]
     [TypeForwardedFrom("System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
-#if netcoreapp20
+#if NETCOREAPP2_0
     internal
 #else
     public
index f031db5..f2f868b 100644 (file)
@@ -80,7 +80,7 @@ namespace System.Net.Security
             ref byte[] resultBlob,
             ref ContextFlagsPal contextFlags)
         {
-#if netstandard
+#if NETSTANDARD2_0
             Span<SecurityBuffer> inSecurityBufferSpan = new SecurityBuffer[2];
 #else
             TwoSecurityBuffers twoSecurityBuffers = default;
@@ -151,7 +151,7 @@ namespace System.Net.Security
             ref byte[] resultBlob,
             ref ContextFlagsPal contextFlags)
         {
-#if netstandard
+#if NETSTANDARD2_0
             Span<SecurityBuffer> inSecurityBufferSpan = new SecurityBuffer[2];
 #else
             TwoSecurityBuffers twoSecurityBuffers = default;
@@ -223,7 +223,7 @@ namespace System.Net.Security
             // setup security buffers for ssp call
             // one points at signed data
             // two will receive payload if signature is valid
-#if netstandard
+#if NETSTANDARD2_0
             Span<SecurityBuffer> securityBuffer = new SecurityBuffer[2];
 #else
             TwoSecurityBuffers stackBuffer = default;
@@ -270,7 +270,7 @@ namespace System.Net.Security
             Buffer.BlockCopy(buffer, offset, output, sizes.cbMaxSignature, count);
 
             // setup security buffers for ssp call
-#if netstandard
+#if NETSTANDARD2_0
             Span<SecurityBuffer> securityBuffer = new SecurityBuffer[2];
 #else
             TwoSecurityBuffers stackBuffer = default;
index 0f6295b..04e4285 100644 (file)
@@ -9,7 +9,7 @@ namespace System.Net
     internal static class SecurityProtocol
     {
         public const SslProtocols DefaultSecurityProtocols =
-#if !netstandard && !netfx
+#if !NETSTANDARD2_0 && !NETFRAMEWORK
             SslProtocols.Tls13 |
 #endif
             SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12;
index af0f815..b103f8b 100644 (file)
@@ -65,7 +65,7 @@ namespace System.Runtime.InteropServices
                     return new FunctionLoadResult<T>(FunctionLoadResultKind.LibraryNotFound, null);
                 }
 
-#if netcoreapp20
+#if NETCOREAPP2_0
                 IntPtr funcPtr = LoadFunctionPointer(nativeLibraryHandle, funcName);
                 if (funcPtr == IntPtr.Zero)
                 {
index 791a6b4..fef0bdf 100644 (file)
@@ -58,7 +58,7 @@ namespace System.Security.Cryptography.Asn1
         }
 
         public
-#if netcoreapp || netcoreapp30 || uap || NETCOREAPP || netstandard21
+#if uap || NETCOREAPP || NETSTANDARD2_1
             override
 #endif
         int GetByteCount(ReadOnlySpan<char> chars)
@@ -93,7 +93,7 @@ namespace System.Security.Cryptography.Asn1
         }
 
         public
-#if netcoreapp || netcoreapp30 || uap || NETCOREAPP || netstandard21
+#if uap || NETCOREAPP || NETSTANDARD2_1
             override
 #endif
         int GetCharCount(ReadOnlySpan<byte> bytes)
@@ -397,7 +397,7 @@ namespace System.Security.Cryptography.Asn1
             return s_utf8Encoding.GetByteCount(s);
         }
 
-#if netcoreapp || netcoreapp30 || uap || NETCOREAPP || netstandard21
+#if uap || NETCOREAPP || NETSTANDARD2_1
         public override int GetByteCount(ReadOnlySpan<char> chars)
         {
             return s_utf8Encoding.GetByteCount(chars);
@@ -438,7 +438,7 @@ namespace System.Security.Cryptography.Asn1
             }
         }
 
-#if netcoreapp || netcoreapp30 || uap || NETCOREAPP || netstandard21
+#if uap || NETCOREAPP || NETSTANDARD2_1
         public override int GetCharCount(ReadOnlySpan<byte> bytes)
         {
             try
index ea54594..c3e1996 100644 (file)
@@ -117,7 +117,7 @@ namespace System.Security.Cryptography.Asn1
             _offset += bitString.Length;
         }
 
-#if netcoreapp || uap || NETCOREAPP || netstandard21
+#if uap || NETCOREAPP || NETSTANDARD2_1
         /// <summary>
         ///   Write a Bit String value via a callback, with a tag UNIVERSAL 3.
         /// </summary>
index f46f6c3..0aee627 100644 (file)
@@ -20,7 +20,7 @@ namespace System.Security.Cryptography
 
             if (!clearWholeArray && clearSize != 0)
             {
-#if netcoreapp || netcoreapp30 || uap || NETCOREAPP || netstandard21
+#if uap || NETCOREAPP || NETSTANDARD2_1
                 CryptographicOperations.ZeroMemory(array.AsSpan(0, clearSize));
 #else
                 Array.Clear(array, 0, clearSize);
index 5eb2556..dff6700 100644 (file)
@@ -45,12 +45,12 @@ namespace System
         {
             get
             {
-#if netcoreapp
+#if NETCOREAPP
                 if (IsWindows)
                 {
 #endif
                     return IsNotWindowsNanoServer && IsNotWindowsServerCore && !IsUap;
-#if netcoreapp
+#if NETCOREAPP
                 }
                 else if (IsOSX)
                 {
index a831ffe..61ae485 100644 (file)
@@ -172,7 +172,7 @@ namespace System.IO.Compression.Tests
                         using (Stream entrystream = entry.Open())
                         {
                             entrystream.Read(buffer, 0, buffer.Length);
-#if netcoreapp || uap
+#if NETCOREAPP || uap
                             uint zipcrc = entry.Crc32;
                             Assert.Equal(CRC.CalculateCRC(buffer), zipcrc.ToString());
 #endif
index c6b5711..2092e6e 100644 (file)
@@ -380,7 +380,7 @@ namespace System.Net.Test.Common
             public int ListenBacklog { get; set; } = 1;
             public bool UseSsl { get; set; } = false;
             public SslProtocols SslProtocols { get; set; } =
-#if !netstandard
+#if !NETSTANDARD2_0
                 SslProtocols.Tls13 |
 #endif
                 SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12;
@@ -432,7 +432,7 @@ namespace System.Net.Test.Common
                     _readStart += copyLength;
                     return copyLength;
                 }
-#if NETSTANDARD
+#if NETSTANDARD2_0
                 // stream does not have Memory<t> overload
                 byte[] tempBuffer = new byte[size];
                 int readLength = await _stream.ReadAsync(tempBuffer, 0, size).ConfigureAwait(false);
index 6ea10ea..de8cf6d 100644 (file)
@@ -12,7 +12,7 @@ namespace System.Net.Test.Common
     public class SslProtocolSupport
     {
         public const SslProtocols DefaultSslProtocols =
-#if !netstandard
+#if !NETSTANDARD2_0
             SslProtocols.Tls13 |
 #endif
             SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls;
@@ -28,7 +28,7 @@ namespace System.Net.Test.Common
                     supported |= SslProtocols.Ssl3;
                 }
 #pragma warning restore 0618
-#if !netstandard
+#if !NETSTANDARD2_0
                 // TLS 1.3 is new
                 if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && PlatformDetection.OpenSslVersion >= new Version(1, 1, 1))
                 {
index 4548cef..37c6438 100644 (file)
@@ -74,7 +74,7 @@ namespace System.Security.Cryptography.Dsa.Tests
         }
     }
 
-#if netcoreapp
+#if NETCOREAPP
     public sealed class DSASignVerify_Span : DSASignVerify
     {
         public override byte[] SignData(DSA dsa, byte[] data, HashAlgorithmName hashAlgorithm) =>
index f1751c1..628b175 100644 (file)
@@ -6,7 +6,7 @@ namespace System.Security.Cryptography.Tests
 {
     public class CurveDef
     {
-#if netcoreapp
+#if NETCOREAPP
         public CurveDef() { }
         public ECCurve Curve;
         public ECCurve.ECCurveType CurveType;
index 2d6b79e..b13d0e9 100644 (file)
@@ -16,7 +16,7 @@ namespace System.Security.Cryptography.Tests
     /// </summary>
     public abstract class EccTestBase
     {
-#if netcoreapp
+#if NETCOREAPP
         internal const string ECDSA_P224_OID_VALUE = "1.3.132.0.33"; // Also called nistP224 or secP224r1
         internal const string ECDSA_P256_OID_VALUE = "1.2.840.10045.3.1.7"; // Also called nistP256, secP256r1 or prime256v1(OpenSsl)
         internal const string ECDSA_P384_OID_VALUE = "1.3.132.0.34"; // Also called nistP384 or secP384r1
@@ -250,6 +250,6 @@ namespace System.Security.Cryptography.Tests
                 }
             }
         }
-#endif // netcoreapp
+#endif
     }
 }
index 2952086..41718a9 100644 (file)
@@ -8,7 +8,7 @@ namespace System.Security.Cryptography.EcDiffieHellman.Tests
     {
         ECDiffieHellman Create();
         ECDiffieHellman Create(int keySize);
-#if netcoreapp
+#if NETCOREAPP
         ECDiffieHellman Create(ECCurve curve);
 #endif
         bool IsCurveValid(Oid oid);
@@ -27,7 +27,7 @@ namespace System.Security.Cryptography.EcDiffieHellman.Tests
             return s_provider.Create(keySize);
         }
 
-#if netcoreapp
+#if NETCOREAPP
         public static ECDiffieHellman Create(ECCurve curve)
         {
             return s_provider.Create(curve);
index cb9e191..798b95a 100644 (file)
@@ -260,7 +260,7 @@ namespace System.Security.Cryptography.EcDiffieHellman.Tests
             };
         }
 
-#if netcoreapp
+#if NETCOREAPP
         [Theory]
         [MemberData(nameof(HashDerivationTestCases))]
         public static void HashDerivation_KnownResults(
index a060b24..3f2504b 100644 (file)
@@ -316,7 +316,7 @@ namespace System.Security.Cryptography.EcDiffieHellman.Tests
             };
         }
 
-#if netcoreapp
+#if NETCOREAPP
         [Theory]
         [MemberData(nameof(HmacDerivationTestCases))]
         public static void HmacDerivation_KnownResults(
index 418508a..fa9d529 100644 (file)
@@ -8,7 +8,7 @@ using Xunit;
 
 namespace System.Security.Cryptography.EcDiffieHellman.Tests
 {
-#if netcoreapp
+#if NETCOREAPP
     public partial class ECDiffieHellmanTests
     {
         // On CentOS, secp224r1 (also called nistP224) appears to be disabled. To prevent test failures on that platform,
index 2eddcda..a245bf4 100644 (file)
@@ -9,7 +9,7 @@ using Xunit;
 
 namespace System.Security.Cryptography.EcDiffieHellman.Tests
 {
-#if netcoreapp
+#if NETCOREAPP
     // These test cases are from http://csrc.nist.gov/groups/STM/cavp/component-testing.html#test-vectors
     // SP 800-56A ECCCDH Primitive test vectors
     // ecccdhtestvectors.zip
index c11badb..d62bb7c 100644 (file)
@@ -190,7 +190,7 @@ namespace System.Security.Cryptography.EcDiffieHellman.Tests
             };
         }
 
-#if netcoreapp
+#if NETCOREAPP
         [Theory]
         [MemberData(nameof(TlsDerivationTestCases))]
         public static void TlsDerivation_KnownResults(string labelText, string answerHex)
index dc0d0fd..15964b3 100644 (file)
@@ -158,7 +158,7 @@ namespace System.Security.Cryptography.EcDiffieHellman.Tests
                 });
         }
 
-#if netcoreapp
+#if NETCOREAPP
         private static ECDiffieHellman OpenKnownKey()
         {
             ECParameters ecParams = new ECParameters
index 80d51a7..221ad59 100644 (file)
@@ -8,7 +8,7 @@ namespace System.Security.Cryptography.EcDsa.Tests
     {
         ECDsa Create();
         ECDsa Create(int keySize);
-#if netcoreapp
+#if NETCOREAPP
         ECDsa Create(ECCurve curve);
 #endif
         bool IsCurveValid(Oid oid);
@@ -27,7 +27,7 @@ namespace System.Security.Cryptography.EcDsa.Tests
             return s_provider.Create(keySize);
         }
 
-#if netcoreapp
+#if NETCOREAPP
         public static ECDsa Create(ECCurve curve)
         {
             return s_provider.Create(curve);
index b94fb22..fbd7850 100644 (file)
@@ -10,7 +10,7 @@ namespace System.Security.Cryptography.EcDsa.Tests
 {
     public class ECDsaImportExportTests : ECDsaTestsBase
     {
-#if netcoreapp
+#if NETCOREAPP
         [Fact]
         public static void DiminishedCoordsRoundtrip()
         {
index c808a36..963ca97 100644 (file)
@@ -31,7 +31,7 @@ namespace System.Security.Cryptography.EcDsa.Tests
             throw new NotImplementedException();
         }
 
-#if netcoreapp
+#if NETCOREAPP
         public override void ImportParameters(ECParameters parameters)
         {
             throw new NotImplementedException();
index 3fc5629..13ad915 100644 (file)
@@ -14,7 +14,7 @@ namespace System.Security.Cryptography.EcDsa.Tests
         // FIPS 186-4 ECDSA test vectors
         // 186-3ecdsatestvectors.zip
         // SigGen.txt
-#if netcoreapp
+#if NETCOREAPP
         [Fact]
         public static void ValidateNistP256Sha256()
         {
@@ -287,6 +287,6 @@ namespace System.Security.Cryptography.EcDsa.Tests
                 }
             }
         }
-#endif // netcoreapp
+#endif
     }
 }
index 4afe3a0..2211cf0 100644 (file)
@@ -15,7 +15,7 @@ namespace System.Security.Cryptography.EcDsa.Tests
     /// </summary>
     public abstract class ECDsaTestsBase : EccTestBase
     {
-#if netcoreapp
+#if NETCOREAPP
         internal static void Verify256(ECDsa e, bool expected)
         {
             byte[] sig = ("998791331eb2e1f4259297f5d9cb82fa20dec98e1cb0900e6b8f014a406c3d02cbdbf5238bde471c3155fc25565524301429"
@@ -41,7 +41,7 @@ namespace System.Security.Cryptography.EcDsa.Tests
                 return ECDsaFactory.ExplicitCurvesSupported;
             }
         }
-#endif // netcoreapp
+#endif
     }
 
     internal static class EcDsaTestExtensions
index 93d7a81..a602041 100644 (file)
@@ -4,7 +4,6 @@
   <PropertyGroup>
     <EnableDefaultItems>false</EnableDefaultItems>
     <EmbedUntrackedSources>true</EmbedUntrackedSources>
-    <DisableImplicitFrameworkDefines>true</DisableImplicitFrameworkDefines>
     <DisableImplicitConfigurationDefines>true</DisableImplicitConfigurationDefines>
 
     <!-- Workaround for https://github.com/microsoft/msbuild/issues/4474 -->
index 2aa625a..6805291 100644 (file)
@@ -119,7 +119,7 @@ namespace System.Collections.Immutable
         public System.Collections.Immutable.ImmutableArray<T> Add(T item) { throw null; }
         public System.Collections.Immutable.ImmutableArray<T> AddRange(System.Collections.Generic.IEnumerable<T> items) { throw null; }
         public System.Collections.Immutable.ImmutableArray<T> AddRange(System.Collections.Immutable.ImmutableArray<T> items) { throw null; }
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
         public System.ReadOnlyMemory<T> AsMemory() { throw null; }
         public System.ReadOnlySpan<T> AsSpan() { throw null; }
 #endif
@@ -143,7 +143,7 @@ namespace System.Collections.Immutable
         public System.Collections.Immutable.ImmutableArray<T> Insert(int index, T item) { throw null; }
         public System.Collections.Immutable.ImmutableArray<T> InsertRange(int index, System.Collections.Generic.IEnumerable<T> items) { throw null; }
         public System.Collections.Immutable.ImmutableArray<T> InsertRange(int index, System.Collections.Immutable.ImmutableArray<T> items) { throw null; }
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
         public ref readonly T ItemRef(int index) { throw null; }
 #endif
         public int LastIndexOf(T item) { throw null; }
@@ -228,7 +228,7 @@ namespace System.Collections.Immutable
             public int IndexOf(T item, int startIndex, int count) { throw null; }
             public int IndexOf(T item, int startIndex, int count, System.Collections.Generic.IEqualityComparer<T> equalityComparer) { throw null; }
             public void Insert(int index, T item) { }
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
             public ref readonly T ItemRef(int index) { throw null; }
 #endif
             public int LastIndexOf(T item) { throw null; }
@@ -581,7 +581,7 @@ namespace System.Collections.Immutable
         public int IndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer<T> equalityComparer) { throw null; }
         public System.Collections.Immutable.ImmutableList<T> Insert(int index, T item) { throw null; }
         public System.Collections.Immutable.ImmutableList<T> InsertRange(int index, System.Collections.Generic.IEnumerable<T> items) { throw null; }
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
         public ref readonly T ItemRef(int index) { throw null; }
 #endif
         public int LastIndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer<T> equalityComparer) { throw null; }
@@ -671,7 +671,7 @@ namespace System.Collections.Immutable
             public int IndexOf(T item, int index, int count, System.Collections.Generic.IEqualityComparer<T> equalityComparer) { throw null; }
             public void Insert(int index, T item) { }
             public void InsertRange(int index, System.Collections.Generic.IEnumerable<T> items) { }
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
             public ref readonly T ItemRef(int index) { throw null; }
 #endif
             public int LastIndexOf(T item) { throw null; }
@@ -730,7 +730,7 @@ namespace System.Collections.Immutable
         public System.Collections.Immutable.ImmutableQueue<T> Enqueue(T value) { throw null; }
         public System.Collections.Immutable.ImmutableQueue<T>.Enumerator GetEnumerator() { throw null; }
         public T Peek() { throw null; }
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
         public ref readonly T PeekRef() { throw null; }
 #endif
         System.Collections.Generic.IEnumerator<T> System.Collections.Generic.IEnumerable<T>.GetEnumerator() { throw null; }
@@ -823,7 +823,7 @@ namespace System.Collections.Immutable
         public System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue>.Builder ToBuilder() { throw null; }
         public bool TryGetKey(TKey equalKey, out TKey actualKey) { throw null; }
         public bool TryGetValue(TKey key, out TValue value) { throw null; }
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
         public ref readonly TValue ValueRef(TKey key) { throw null; }
 #endif
         public System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue> WithComparers(System.Collections.Generic.IComparer<TKey> keyComparer) { throw null; }
@@ -871,7 +871,7 @@ namespace System.Collections.Immutable
             public System.Collections.Immutable.ImmutableSortedDictionary<TKey, TValue> ToImmutable() { throw null; }
             public bool TryGetKey(TKey equalKey, out TKey actualKey) { throw null; }
             public bool TryGetValue(TKey key, out TValue value) { throw null; }
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
             public ref readonly TValue ValueRef(TKey key) { throw null; }
 #endif
         }
@@ -931,7 +931,7 @@ namespace System.Collections.Immutable
         public bool IsProperSupersetOf(System.Collections.Generic.IEnumerable<T> other) { throw null; }
         public bool IsSubsetOf(System.Collections.Generic.IEnumerable<T> other) { throw null; }
         public bool IsSupersetOf(System.Collections.Generic.IEnumerable<T> other) { throw null; }
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
         public ref readonly T ItemRef(int index) { throw null; }
 #endif
         public bool Overlaps(System.Collections.Generic.IEnumerable<T> other) { throw null; }
@@ -992,7 +992,7 @@ namespace System.Collections.Immutable
             public bool IsProperSupersetOf(System.Collections.Generic.IEnumerable<T> other) { throw null; }
             public bool IsSubsetOf(System.Collections.Generic.IEnumerable<T> other) { throw null; }
             public bool IsSupersetOf(System.Collections.Generic.IEnumerable<T> other) { throw null; }
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
             public ref readonly T ItemRef(int index) { throw null; }
 #endif
             public bool Overlaps(System.Collections.Generic.IEnumerable<T> other) { throw null; }
@@ -1036,7 +1036,7 @@ namespace System.Collections.Immutable
         public System.Collections.Immutable.ImmutableStack<T> Clear() { throw null; }
         public System.Collections.Immutable.ImmutableStack<T>.Enumerator GetEnumerator() { throw null; }
         public T Peek() { throw null; }
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
         public ref readonly T PeekRef() { throw null; }
 #endif
         public System.Collections.Immutable.ImmutableStack<T> Pop() { throw null; }
index 609e751..97712e5 100644 (file)
@@ -159,7 +159,7 @@ namespace System.Collections.Immutable
                 }
             }
 
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
             /// <summary>
             /// Gets a read-only reference to the element at the specified index.
             /// </summary>
index 706ce5a..4b59ffc 100644 (file)
@@ -131,7 +131,7 @@ namespace System.Collections.Immutable
             }
         }
 
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
         /// <summary>
         /// Gets a read-only reference to the element at the specified index in the read-only list.
         /// </summary>
index dc827b1..a8aaab4 100644 (file)
@@ -92,7 +92,7 @@ namespace System.Collections.Immutable
             }
         }
 
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
         public ReadOnlySpan<T> AsSpan() => new ReadOnlySpan<T>(array);
 
         public ReadOnlyMemory<T> AsMemory() => new ReadOnlyMemory<T>(array);
index d22990b..c3612ff 100644 (file)
@@ -186,7 +186,7 @@ namespace System.Collections.Immutable
                             result = OperationResult.NoChangeRequired;
                             return this;
                         case KeyCollisionBehavior.ThrowIfValueDifferent:
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
                             ref readonly var existingEntry = ref _additionalElements.ItemRef(keyCollisionIndex);
 #else
                             var existingEntry = _additionalElements[keyCollisionIndex];
@@ -281,7 +281,7 @@ namespace System.Collections.Immutable
                     return false;
                 }
 
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
                 value = _additionalElements.ItemRef(index).Value;
 #else
                 value = _additionalElements[index].Value;
@@ -324,7 +324,7 @@ namespace System.Collections.Immutable
                     return false;
                 }
 
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
                 actualKey = _additionalElements.ItemRef(index).Key;
 #else
                 actualKey = _additionalElements[index].Key;
index 1a372f1..d830c06 100644 (file)
@@ -182,7 +182,7 @@ namespace System.Collections.Immutable
                     int index = _additionalElements.IndexOf(value, valueComparer);
                     if (index >= 0)
                     {
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
                         existingValue = _additionalElements.ItemRef(index);
 #else
                         existingValue = _additionalElements[index];
index cc8ac35..460fc0a 100644 (file)
@@ -135,7 +135,7 @@ namespace System.Collections.Immutable
             {
                 get
                 {
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
                     return this.Root.ItemRef(index);
 #else
                     return this.Root[index];
@@ -159,7 +159,7 @@ namespace System.Collections.Immutable
                 }
             }
 
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
             /// <summary>
             /// Gets a read-only reference to the value for a given index into the list.
             /// </summary>
index 06f4e67..f62bbf9 100644 (file)
@@ -187,7 +187,7 @@ namespace System.Collections.Immutable
                 }
             }
 
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
             /// <summary>
             /// Gets a read-only reference to the element of the set at the given index.
             /// </summary>
@@ -524,7 +524,7 @@ namespace System.Collections.Immutable
                 int end = index + count - 1;
                 while (start < end)
                 {
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
                     T a = result.ItemRef(start);
                     T b = result.ItemRef(end);
 #else
index 946f065..55059b7 100644 (file)
@@ -169,13 +169,13 @@ namespace System.Collections.Immutable
         /// <param name="index">The 0-based index of the element in the set to return.</param>
         /// <returns>The element at the given position.</returns>
         /// <exception cref="IndexOutOfRangeException">Thrown from getter when <paramref name="index"/> is negative or not less than <see cref="Count"/>.</exception>
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
         public T this[int index] => _root.ItemRef(index);
 #else
         public T this[int index] => _root[index];
 #endif
 
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
         /// <summary>
         /// Gets a read-only reference to the element of the set at the given index.
         /// </summary>
index 1f3c906..92eb566 100644 (file)
@@ -138,7 +138,7 @@ namespace System.Collections.Immutable
             return _forwards.Peek();
         }
 
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
         /// <summary>
         /// Gets a read-only reference to the element at the front of the queue.
         /// </summary>
index e77548e..a91ff61 100644 (file)
@@ -202,7 +202,7 @@ namespace System.Collections.Immutable
                 }
             }
 
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
             /// <summary>
             /// Returns a read-only reference to the value associated with the provided key.
             /// </summary>
index 94827ce..b4e4349 100644 (file)
@@ -329,7 +329,7 @@ namespace System.Collections.Immutable
                 return this.RemoveRecursive(key, keyComparer, out mutated);
             }
 
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
             /// <summary>
             /// Returns a read-only reference to the value associated with the provided key.
             /// </summary>
index 3c8dff5..f87a5f8 100644 (file)
@@ -209,7 +209,7 @@ namespace System.Collections.Immutable
             }
         }
 
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
         /// <summary>
         /// Returns a read-only reference to the value associated with the provided key.
         /// </summary>
index 66d3017..f392be6 100644 (file)
@@ -105,14 +105,14 @@ namespace System.Collections.Immutable
             /// </remarks>
             public T this[int index]
             {
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
                 get { return _root.ItemRef(index); }
 #else
                 get { return _root[index]; }
 #endif
             }
 
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
             /// <summary>
             /// Gets a read-only reference to the element of the set at the given index.
             /// </summary>
index 42ac6ac..ed5a5eb 100644 (file)
@@ -253,7 +253,7 @@ namespace System.Collections.Immutable
                 }
             }
 
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
             /// <summary>
             /// Gets a read-only reference to the element of the set at the given index.
             /// </summary>
index 9f76d06..6b49ad3 100644 (file)
@@ -148,7 +148,7 @@ namespace System.Collections.Immutable
         {
             get
             {
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
                 return _root.ItemRef(index);
 #else
                 return _root[index];
@@ -156,7 +156,7 @@ namespace System.Collections.Immutable
             }
         }
 
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
         /// <summary>
         /// Gets a read-only reference of the element of the set at the given index.
         /// </summary>
index ce3053e..e133cca 100644 (file)
@@ -117,7 +117,7 @@ namespace System.Collections.Immutable
             return _head;
         }
 
-#if !NETSTANDARD10
+#if !NETSTANDARD1_0
         /// <summary>
         /// Gets a read-only reference to the element on the top of the stack.
         /// </summary>
index f1f2b40..fb231f0 100644 (file)
@@ -793,7 +793,7 @@ namespace System.Collections.Immutable.Tests
             Assert.IsType<ArgumentNullException>(tie.InnerException);
         }
 
-#if netcoreapp
+#if NETCOREAPP
         [Fact]
         public void UsableWithCollectibleAssemblies()
         {
@@ -812,7 +812,7 @@ namespace System.Collections.Immutable.Tests
 
             list.GetEnumerator(); // ensure this doesn't throw
         }
-#endif // netcoreapp
+#endif
 
         [Fact]
         public void ItemRef()
index cbbdf95..c9a74b3 100644 (file)
@@ -8,8 +8,7 @@
     <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(OSGroup)' == 'AnyOS'">SR.PlatformNotSupported_DataSqlClient</GeneratePlatformNotSupportedAssemblyMessage>
     <AssemblyVersion Condition="'$(TargetGroup)' == 'netstandard1.2'">4.0.0.0</AssemblyVersion>
     <AssemblyVersion Condition="'$(TargetGroup)' == 'netstandard1.3'">4.1.0.0</AssemblyVersion>
-    <DefineConstants Condition="'$(TargetsNetCoreApp)' != 'true'">$(DefineConstants);netstandard</DefineConstants>
-    <DefineConstants Condition="'$(TargetsNetCoreApp)' == 'true'">$(DefineConstants);netcoreapp</DefineConstants>
+    <DefineConstants Condition="'$(TargetsNetCoreApp)' != 'true'">$(DefineConstants);NETSTANDARD2_0</DefineConstants>
     <DefineConstants Condition="'$(TargetGroup)' == 'netcoreapp'">$(DefineConstants);FEATURE_TCPKEEPALIVE</DefineConstants>
     <DefineConstants Condition="'$(TargetGroup)' != 'netcoreapp'">$(DefineConstants);INTERNAL_NULLABLE_ATTRIBUTES</DefineConstants>
     <Configurations>net461-Windows_NT-Debug;net461-Windows_NT-Release;netcoreapp-Debug;netcoreapp-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp2.1-Debug;netcoreapp2.1-Release;netcoreapp2.1-Unix-Debug;netcoreapp2.1-Unix-Release;netcoreapp2.1-Windows_NT-Debug;netcoreapp2.1-Windows_NT-Release;netfx-Windows_NT-Debug;netfx-Windows_NT-Release;netstandard-Debug;netstandard-Release;netstandard-Unix-Debug;netstandard-Unix-Release;netstandard-Windows_NT-Debug;netstandard-Windows_NT-Release;netstandard1.2-Debug;netstandard1.2-Release;netstandard1.3-Debug;netstandard1.3-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uap10.0.16299-Windows_NT-Debug;uap10.0.16299-Windows_NT-Release</Configurations>
index 3e65e5c..47422c6 100644 (file)
@@ -306,7 +306,7 @@ namespace System.Data.Common
         internal const string MaxPoolSize = "Max Pool Size";
         internal const string Pooling = "Pooling";
         internal const string MinPoolSize = "Min Pool Size";
-#if netcoreapp
+#if NETCOREAPP
         internal const string PoolBlockingPeriod = "PoolBlockingPeriod";
 #endif
     }
index d8b2cd9..af8ba0c 100644 (file)
@@ -3,7 +3,7 @@
 // See the LICENSE file in the project root for more information.
 
 using System.Diagnostics;
-#if !netcoreapp
+#if NETCOREAPP2_1 || !NETCOREAPP
 using System.Linq;
 #endif
 using System.Net;
@@ -562,7 +562,7 @@ namespace System.Data.SqlClient.SNI
                 ? _workingDataSource.Substring(firstIndexOfColon + 1).Trim() : _workingDataSource;
 
             // Pipe paths only allow back slashes
-#if netcoreapp
+#if NETCOREAPP
             if (_dataSourceAfterTrimmingProtocol.Contains('/')) // string.Contains(char) is .NetCore2.1+ specific
 #else
             if (_dataSourceAfterTrimmingProtocol.Contains("/"))
index a15dbbe..b7bd4a1 100644 (file)
@@ -56,7 +56,7 @@ namespace System.Data.SqlClient
             internal const string Application_Name = "application name";
             internal const string AsynchronousProcessing = "asynchronous processing";
             internal const string AttachDBFilename = "attachdbfilename";
-#if netcoreapp
+#if NETCOREAPP
             internal const string PoolBlockingPeriod = "poolblockingperiod";
 #endif
             internal const string Connect_Timeout = "connect timeout";
@@ -220,7 +220,7 @@ namespace System.Data.SqlClient
             }
 
             _integratedSecurity = ConvertValueToIntegratedSecurity();
-#if netcoreapp
+#if NETCOREAPP
             _poolBlockingPeriod = ConvertValueToPoolBlockingPeriod();
 #endif
             _encrypt = ConvertValueToBoolean(KEY.Encrypt, DEFAULT.Encrypt);
@@ -420,7 +420,7 @@ namespace System.Data.SqlClient
             _userInstance = userInstance;
             _connectTimeout = connectionOptions._connectTimeout;
             _loadBalanceTimeout = connectionOptions._loadBalanceTimeout;
-#if netcoreapp
+#if NETCOREAPP
             _poolBlockingPeriod = connectionOptions._poolBlockingPeriod;
 #endif
             _maxPoolSize = connectionOptions._maxPoolSize;
@@ -504,7 +504,7 @@ namespace System.Data.SqlClient
                     { KEY.Application_Name, KEY.Application_Name },
                     { KEY.AsynchronousProcessing, KEY.AsynchronousProcessing },
                     { KEY.AttachDBFilename, KEY.AttachDBFilename },
-#if netcoreapp
+#if NETCOREAPP
                     { KEY.PoolBlockingPeriod, KEY.PoolBlockingPeriod},
 #endif
                     { KEY.Connect_Timeout, KEY.Connect_Timeout },
index 402c952..733f604 100644 (file)
@@ -30,7 +30,7 @@ namespace System.Data.SqlClient
             Pooling,
             MinPoolSize,
             MaxPoolSize,
-#if netcoreapp
+#if NETCOREAPP
             PoolBlockingPeriod,
 #endif
 
@@ -109,7 +109,7 @@ namespace System.Data.SqlClient
             validKeywords[(int)Keywords.ApplicationIntent] = DbConnectionStringKeywords.ApplicationIntent;
             validKeywords[(int)Keywords.ApplicationName] = DbConnectionStringKeywords.ApplicationName;
             validKeywords[(int)Keywords.AttachDBFilename] = DbConnectionStringKeywords.AttachDBFilename;
-#if netcoreapp
+#if NETCOREAPP
             validKeywords[(int)Keywords.PoolBlockingPeriod] = DbConnectionStringKeywords.PoolBlockingPeriod;
 #endif
             validKeywords[(int)Keywords.ConnectTimeout] = DbConnectionStringKeywords.ConnectTimeout;
@@ -148,7 +148,7 @@ namespace System.Data.SqlClient
             hash.Add(DbConnectionStringKeywords.ApplicationIntent, Keywords.ApplicationIntent);
             hash.Add(DbConnectionStringKeywords.ApplicationName, Keywords.ApplicationName);
             hash.Add(DbConnectionStringKeywords.AttachDBFilename, Keywords.AttachDBFilename);
-#if netcoreapp
+#if NETCOREAPP
             hash.Add(DbConnectionStringKeywords.PoolBlockingPeriod, Keywords.PoolBlockingPeriod);
 #endif
             hash.Add(DbConnectionStringKeywords.ConnectTimeout, Keywords.ConnectTimeout);
@@ -248,7 +248,7 @@ namespace System.Data.SqlClient
                         case Keywords.PacketSize: PacketSize = ConvertToInt32(value); break;
 
                         case Keywords.IntegratedSecurity: IntegratedSecurity = ConvertToIntegratedSecurity(value); break;
-#if netcoreapp
+#if NETCOREAPP
                         case Keywords.PoolBlockingPeriod: PoolBlockingPeriod = ConvertToPoolBlockingPeriod(keyword, value); break;
 #endif
                         case Keywords.Encrypt: Encrypt = ConvertToBoolean(value); break;
@@ -682,7 +682,7 @@ namespace System.Data.SqlClient
                 case Keywords.ApplicationIntent: return this.ApplicationIntent;
                 case Keywords.ApplicationName: return ApplicationName;
                 case Keywords.AttachDBFilename: return AttachDBFilename;
-#if netcoreapp
+#if NETCOREAPP
                 case Keywords.PoolBlockingPeriod: return PoolBlockingPeriod;
 #endif
                 case Keywords.ConnectTimeout: return ConnectTimeout;
@@ -759,7 +759,7 @@ namespace System.Data.SqlClient
                 case Keywords.AttachDBFilename:
                     _attachDBFilename = DbConnectionStringDefaults.AttachDBFilename;
                     break;
-#if netcoreapp
+#if NETCOREAPP
                 case Keywords.PoolBlockingPeriod:
                     _poolBlockingPeriod = DbConnectionStringDefaults.PoolBlockingPeriod;
                     break;
index 50b782c..d47cd17 100644 (file)
@@ -603,7 +603,7 @@ namespace System.Data.SqlClient
         internal void SetGuid(Guid value)
         {
             Debug.Assert(SmiXetterAccessMap.IsSetterAccessValid(_metaData, SmiXetterTypeCode.XetGuid));
-#if netcoreapp
+#if NETCOREAPP
             Span<byte> bytes = stackalloc byte[16];
             value.TryWriteBytes(bytes);
 #else
@@ -621,7 +621,7 @@ namespace System.Data.SqlClient
 
                 _stateObj.WriteByte((byte)_metaData.MaxLength);
             }
-#if netcoreapp
+#if NETCOREAPP
             _stateObj.WriteByteSpan(bytes);
 #else
             _stateObj.WriteByteArray(bytes, bytes.Length, 0);
index 238a412..3885c03 100644 (file)
@@ -15,7 +15,7 @@ using System.IO;
 
 using static Interop.Advapi32;
 
-#if !netcoreapp
+#if NETCOREAPP2_0 || !NETCOREAPP
 using MemoryMarshal = System.Diagnostics.PerformanceCounterLib;
 #endif
 
@@ -106,7 +106,7 @@ namespace System.Diagnostics
             }
         }
 
-#if !netcoreapp
+#if NETCOREAPP2_0 || !NETCOREAPP
         internal static T Read<T>(ReadOnlySpan<byte> span) where T : struct
             => System.Runtime.InteropServices.MemoryMarshal.Read<T>(span);
 
index b56c9b1..21a6388 100644 (file)
@@ -270,7 +270,7 @@ namespace System.Drawing
         Whiteness = 16711778,
         CaptureBlt = 1073741824,
     }
-#if netcoreapp || netcoreapp30
+#if NETCOREAPP
     [System.ComponentModel.TypeConverterAttribute("System.Drawing.FontConverter, System.Windows.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")]
 #endif
     public sealed partial class Font : System.MarshalByRefObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
@@ -631,7 +631,7 @@ namespace System.Drawing
         Document = 5,
         Millimeter = 6,
     }
-#if netcoreapp || netcoreapp30
+#if NETCOREAPP
     [System.ComponentModel.TypeConverterAttribute("System.Drawing.IconConverter, System.Windows.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")]
 #endif
     public sealed partial class Icon : System.MarshalByRefObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
@@ -668,7 +668,7 @@ namespace System.Drawing
         void ReleaseHdc();
     }
     [System.ComponentModel.ImmutableObjectAttribute(true)]
-#if netcoreapp || netcoreapp30
+#if NETCOREAPP
     [System.ComponentModel.TypeConverterAttribute("System.Drawing.ImageConverter, System.Windows.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")]
 #endif
     public abstract partial class Image : System.MarshalByRefObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
@@ -2290,7 +2290,7 @@ namespace System.Drawing.Imaging
         ReadOnly = 65536,
         Caching = 131072,
     }
-#if netcoreapp || netcoreapp30
+#if NETCOREAPP
     [System.ComponentModel.TypeConverterAttribute("System.Drawing.ImageFormatConverter, System.Windows.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")]
 #endif
     public sealed partial class ImageFormat
@@ -2489,7 +2489,7 @@ namespace System.Drawing.Printing
         protected InvalidPrinterException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
         public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
     }
-#if netcoreapp || netcoreapp30
+#if NETCOREAPP
     [System.ComponentModel.TypeConverterAttribute("System.Drawing.Printing.MarginsConverter, System.Windows.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")]
 #endif
     public partial class Margins : System.ICloneable
index 7f57129..52233aa 100644 (file)
@@ -1,17 +1,15 @@
 ï»¿<Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OutputType>Library</OutputType>
     <DefineConstants>$(DefineConstants);DRAWING_NAMESPACE</DefineConstants>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <WarningsNotAsErrors>CS0618</WarningsNotAsErrors>
-    <DefineConstants>$(DefineConstants);NETCORE</DefineConstants>
     <DefineConstants Condition="'$(TargetsWindows)' == 'true'">$(DefineConstants);FEATURE_WINDOWS_SYSTEM_COLORS;FEATURE_SYSTEM_EVENTS</DefineConstants>
     <IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
     <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsUap)' == 'true'">SR.PlatformNotSupported_Drawing</GeneratePlatformNotSupportedAssemblyMessage>
     <Configurations>netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;netcoreapp3.0-Unix-Debug;netcoreapp3.0-Unix-Release;netcoreapp3.0-Windows_NT-Debug;netcoreapp3.0-Windows_NT-Release;uap-Debug;uap-Release</Configurations>
   </PropertyGroup>
   <!-- Shared source code, all configurations -->
-  <ItemGroup Condition="$(TargetGroup.StartsWith('netcoreapp'))">
+  <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true'">
     <Compile Include="System\Drawing\Bitmap.cs" />
     <Compile Include="System\Drawing\BitmapSuffixInSameAssemblyAttribute.cs" />
     <Compile Include="System\Drawing\BitmapSuffixInSatelliteAssemblyAttribute.cs" />
     </EmbeddedResource>
   </ItemGroup>
   <!-- Windows-specific -->
-  <ItemGroup Condition="$(TargetGroup.StartsWith('netcoreapp')) AND '$(TargetsWindows)' == 'true'">
+  <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true' and '$(TargetsWindows)' == 'true'">
     <Compile Include="SRDescriptionAttribute.cs" />
     <Compile Include="System\Drawing\Bitmap.Windows.cs" />
     <Compile Include="System\Drawing\BitmapSelector.cs" />
     </Compile>
   </ItemGroup>
   <!-- Unix specific -->
-  <ItemGroup Condition="$(TargetGroup.StartsWith('netcoreapp')) AND '$(TargetsUnix)' == 'true'">
+  <ItemGroup Condition="'$(TargetsNetCoreApp)' == 'true' and '$(TargetsUnix)' == 'true'">
     <Compile Include="System\Drawing\Graphics.Unix.cs" />
     <Compile Include="System\Drawing\Icon.Unix.cs" />
     <Compile Include="System\Drawing\SystemFonts.Unix.cs" />
index 65bf823..9599bd0 100644 (file)
@@ -46,9 +46,6 @@ using System.ComponentModel;
 
 namespace System.Drawing
 {
-#if !NETCORE
-    [Editor ("System.Drawing.Design.BitmapEditor, " + Consts.AssemblySystem_Drawing_Design, typeof (System.Drawing.Design.UITypeEditor))]
-#endif
     public sealed partial class Bitmap
     {
         #region constructors
index 46a84d6..a29f99d 100644 (file)
@@ -41,10 +41,6 @@ using Gdip = System.Drawing.SafeNativeMethods.Gdip;
 
 namespace System.Drawing
 {
-#if !NETCORE
-    [Editor ("System.Drawing.Design.FontEditor, " + Consts.AssemblySystem_Drawing_Design, typeof (System.Drawing.Design.UITypeEditor))]
-    [TypeConverter (typeof (FontConverter))]
-#endif
     public sealed partial class Font
     {
         private const byte DefaultCharSet = 1;
index a32ac69..e22e8b2 100644 (file)
@@ -14,7 +14,7 @@ namespace System.Drawing
     /// <summary>
     /// Defines a particular format for text, including font face, size, and style attributes.
     /// </summary>
-#if netcoreapp || netcoreapp30
+#if NETCOREAPP
     [TypeConverter("System.Drawing.FontConverter, System.Windows.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")]
 #endif
     [Serializable]
@@ -77,18 +77,11 @@ namespace System.Drawing
         /// Gets the face name of this <see cref='Font'/> .
         /// </summary>
         [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
-#if !NETCORE
-        [Editor ("System.Drawing.Design.FontNameEditor, " + Consts.AssemblySystem_Drawing_Design, typeof (System.Drawing.Design.UITypeEditor))]
-        [TypeConverter (typeof (FontConverter.FontNameConverter))]
-#endif
         public string Name => FontFamily.Name;
 
         /// <summary>
         /// Gets the unit of measure for this <see cref='Font'/>.
         /// </summary>
-#if !NETCORE
-        [TypeConverter (typeof (FontConverter.FontUnitConverter))]
-#endif
         public GraphicsUnit Unit => _fontUnit;
 
         /// <summary>
index 3a2f8b7..23494a1 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if netcoreapp20
-using System.Buffers;
-#endif
-
 using System.IO;
 using System.Runtime.InteropServices;
 
@@ -97,16 +93,8 @@ namespace System.Drawing
 
             try
             {
-                // Stream Span API isn't available in 2.0
-#if netcoreapp20
-                byte[] buffer = ArrayPool<byte>.Shared.Rent(bufsz);
-                read = _stream.Read(buffer, 0, bufsz);
-                Marshal.Copy(buffer, 0, (IntPtr)buf, read);
-                ArrayPool<byte>.Shared.Return(buffer);
-#else
                 Span<byte> buffer = new Span<byte>(buf, bufsz);
                 read = _stream.Read(buffer);
-#endif
             }
             catch (IOException)
             {
@@ -136,16 +124,9 @@ namespace System.Drawing
             if (!_stream.CanWrite)
                 return -1;
 
-            // Stream Span API isn't available in 2.0
-#if netcoreapp20
-            byte[] buffer = ArrayPool<byte>.Shared.Rent(bufsz);
-            Marshal.Copy((IntPtr)buf, buffer, 0, bufsz);
-            _stream.Write(buffer, 0, bufsz);
-            ArrayPool<byte>.Shared.Return(buffer);
-#else
             var buffer = new ReadOnlySpan<byte>(buf, bufsz);
             _stream.Write(buffer);
-#endif
+
             return bufsz;
         }
 
index c3d9de2..5640a2d 100644 (file)
@@ -36,12 +36,8 @@ namespace System.Drawing
                 {
                     libraryName = "libgdiplus.dylib";
 
-#if netcoreapp20
-                    lib = Interop.Libdl.dlopen(libraryName, Interop.Libdl.RTLD_LAZY);
-#else // use managed NativeLibrary API from .NET Core 3 onwards
                     var assembly = System.Reflection.Assembly.GetExecutingAssembly();
                     NativeLibrary.TryLoad(libraryName, assembly, default, out lib);
-#endif
                 }
                 else
                 {
@@ -51,40 +47,12 @@ namespace System.Drawing
                     // the name suffixed with ".0".
                     libraryName = "libgdiplus.so";
 
-#if netcoreapp20
-                    lib = Interop.Libdl.dlopen(libraryName, Interop.Libdl.RTLD_LAZY);
-                    if (lib == IntPtr.Zero)
-                    {
-                        lib = Interop.Libdl.dlopen("libgdiplus.so.0", Interop.Libdl.RTLD_LAZY);
-                    }
-#else // use managed NativeLibrary API from .NET Core 3 onwards
                     var assembly = System.Reflection.Assembly.GetExecutingAssembly();
                     if (!NativeLibrary.TryLoad(libraryName, assembly, default, out lib))
                     {
                          NativeLibrary.TryLoad("libgdiplus.so.0", assembly, default, out lib);
                     }
-#endif
-                }
-
-#if netcoreapp20
-                // If we couldn't find libgdiplus in the system search path, try to look for libgdiplus in the
-                // NuGet package folders. This matches the DllImport behavior.
-                if (lib == IntPtr.Zero)
-                {
-                    string[] searchDirectories = ((string)AppContext.GetData("NATIVE_DLL_SEARCH_DIRECTORIES")).Split(':');
-
-                    foreach (var searchDirectory in searchDirectories)
-                    {
-                        var searchPath = Path.Combine(searchDirectory, libraryName);
-
-                        lib = Interop.Libdl.dlopen(searchPath, Interop.Libdl.RTLD_LAZY);
-                        if (lib != IntPtr.Zero)
-                        {
-                            break;
-                        }
-                    }
                 }
-#endif
 
                 // This function may return a null handle. If it does, individual functions loaded from it will throw a DllNotFoundException,
                 // but not until an attempt is made to actually use the function (rather than load it). This matches how PInvokes behave.
index 2a58b9a..74abe56 100644 (file)
@@ -44,15 +44,8 @@ using System.Runtime.InteropServices;
 
 namespace System.Drawing
 {
-#if netcoreapp || netcoreapp30
+#if NETCOREAPP
     [System.ComponentModel.TypeConverter("System.Drawing.IconConverter, System.Windows.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")]
-#else
-#if !NETCORE
-#if !MONOTOUCH
-    [Editor("System.Drawing.Design.IconEditor, " + Consts.AssemblySystem_Drawing_Design, typeof(System.Drawing.Design.UITypeEditor))]
-#endif
-    [TypeConverter(typeof(IconConverter))]
-#endif
 #endif
     [Serializable]
     [System.Runtime.CompilerServices.TypeForwardedFrom("System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
@@ -134,7 +127,6 @@ namespace System.Drawing
         {
         }
 
-#if !MONOTOUCH
         private Icon(IntPtr handle)
         {
             this.handle = handle;
@@ -145,7 +137,6 @@ namespace System.Drawing
             // FIXME: we need to convert the bitmap into an icon
             undisposable = true;
         }
-#endif
 
         public Icon(Icon original, int width, int height)
             : this(original, new Size(width, height))
@@ -352,7 +343,6 @@ namespace System.Drawing
             return new Icon(this, Size);
         }
 
-#if !MONOTOUCH
         public static Icon FromHandle(IntPtr handle)
         {
             if (handle == IntPtr.Zero)
@@ -360,7 +350,7 @@ namespace System.Drawing
 
             return new Icon(handle);
         }
-#endif
+
         private void SaveIconImage(BinaryWriter writer, IconImage ii)
         {
             BitmapInfoHeader bih = ii.iconHeader;
@@ -542,7 +532,7 @@ namespace System.Drawing
             // save every icons available
             Save(outputStream, -1, -1);
         }
-#if !MONOTOUCH
+
         internal Bitmap BuildBitmapOnWin32()
         {
             Bitmap bmp;
@@ -653,14 +643,13 @@ namespace System.Drawing
             //     Image16 for the differences
             return new Bitmap(GetInternalBitmap());
         }
-#endif
+
         public override string ToString()
         {
             //is this correct, this is what returned by .Net
             return "<Icon>";
         }
 
-#if !MONOTOUCH
         [Browsable(false)]
         public IntPtr Handle
         {
@@ -679,7 +668,7 @@ namespace System.Drawing
                 return handle;
             }
         }
-#endif
+
         [Browsable(false)]
         public int Height
         {
index 18e9132..caaf047 100644 (file)
@@ -14,11 +14,11 @@ using System.Runtime.Serialization;
 
 namespace System.Drawing
 {
-    [Serializable]
-    [TypeForwardedFrom("System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
-#if netcoreapp || netcoreapp30
+#if NETCOREAPP
     [TypeConverter("System.Drawing.IconConverter, System.Windows.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")]
 #endif
+    [Serializable]
+    [TypeForwardedFrom("System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
     public sealed partial class Icon : MarshalByRefObject, ICloneable, IDisposable, ISerializable
     {
 #if FINALIZATION_WATCH
index 1604a34..f844c9a 100644 (file)
@@ -45,10 +45,6 @@ using Gdip = System.Drawing.SafeNativeMethods.Gdip;
 
 namespace System.Drawing
 {
-#if !NETCORE
-[Editor ("System.Drawing.Design.ImageEditor, " + Consts.AssemblySystem_Drawing_Design, typeof (System.Drawing.Design.UITypeEditor))]
-[TypeConverter (typeof(ImageConverter))]
-#endif
     public abstract partial class Image
     {
         // public methods
index b87bdc9..5490032 100644 (file)
@@ -18,7 +18,7 @@ namespace System.Drawing
     [ImmutableObject(true)]
     [Serializable]
     [System.Runtime.CompilerServices.TypeForwardedFrom("System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
-#if netcoreapp || netcoreapp30
+#if NETCOREAPP
     [TypeConverter("System.Drawing.ImageConverter, System.Windows.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")]
 #endif
     public abstract partial class Image : MarshalByRefObject, IDisposable, ICloneable, ISerializable
@@ -43,10 +43,6 @@ namespace System.Drawing
 
         [Localizable(false)]
         [DefaultValue(null)]
-#if !NETCORE
-        [BindableAttribute(true)]
-        [TypeConverter(typeof(StringConverter))]
-#endif
         public object Tag
         {
             get => _userData;
index 394a401..1ab3149 100644 (file)
@@ -9,7 +9,7 @@ namespace System.Drawing.Imaging
     /// <summary>
     /// Specifies the format of the image.
     /// </summary>
-#if netcoreapp || netcoreapp30
+#if NETCOREAPP
     [TypeConverter("System.Drawing.ImageFormatConverter, System.Windows.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")]
 #endif
     public sealed class ImageFormat
index 3ef5808..39f55ae 100644 (file)
@@ -40,9 +40,6 @@ using System.Runtime.Serialization;
 
 namespace System.Drawing.Imaging
 {
-#if !NETCORE
-    [Editor ("System.Drawing.Design.MetafileEditor, " + Consts.AssemblySystem_Drawing_Design, typeof (System.Drawing.Design.UITypeEditor))]
-#endif
     public sealed partial class Metafile : Image
     {
         // Usually called when cloning images that need to have
index 1150260..a26c203 100644 (file)
@@ -204,16 +204,8 @@ namespace System.Drawing.Internal
         {
             ActualizeVirtualPosition();
 
-            // Stream Span API isn't available in 2.0
-#if netcoreapp20
-            byte[] buffer = ArrayPool<byte>.Shared.Rent(checked((int)cb));
-            Marshal.Copy((IntPtr)pv, buffer, 0, checked((int)cb));
-            _dataStream.Write(buffer, 0, checked((int)cb));
-            ArrayPool<byte>.Shared.Return(buffer);
-#else
             var buffer = new ReadOnlySpan<byte>(pv, checked((int)cb));
             _dataStream.Write(buffer);
-#endif
 
             if (pcbWritten != null)
                 *pcbWritten = cb;
index c48c75c..a83af80 100644 (file)
@@ -11,7 +11,7 @@ namespace System.Drawing.Printing
     /// <summary>
     /// Specifies the margins of a printed page.
     /// </summary>
-#if netcoreapp || netcoreapp30
+#if NETCOREAPP
     [TypeConverter("System.Drawing.Printing.MarginsConverter, System.Windows.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")]
 #endif
     public partial class Margins : ICloneable
index 927d9fa..304d556 100644 (file)
@@ -40,10 +40,6 @@ using System.ComponentModel;
 
 namespace System.Drawing.Printing
 {
-#if !NETCORE
-    [DefaultEvent ("PrintPage"), DefaultProperty ("DocumentName")]
-    [ToolboxItemFilter ("System.Drawing.Printing", ToolboxItemFilterType.Allow)]
-#endif
     public class PrintDocument : System.ComponentModel.Component
     {
         private PageSettings defaultpagesettings;
index 65291eb..1ee2344 100644 (file)
@@ -98,11 +98,7 @@ namespace System.Drawing.Printing
             }
             catch (DllNotFoundException)
             {
-#if NETCORE
                 System.Diagnostics.Debug.WriteLine("libcups not found. To have printing support, you need cups installed");
-#else
-                Console.WriteLine("libcups not found. To have printing support, you need cups installed");
-#endif
                 return false;
             }
 
@@ -124,11 +120,7 @@ namespace System.Drawing.Printing
             }
             catch (Exception)
             {
-#if NETCORE
                 System.Diagnostics.Debug.WriteLine("There was an error opening the printer {0}. Please check your cups installation.");
-#else
-                Console.WriteLine("There was an error opening the printer {0}. Please check your cups installation.");
-#endif
             }
             return IntPtr.Zero;
         }
index 0f180d2..b9a0e6b 100644 (file)
@@ -46,7 +46,6 @@ namespace System.Drawing
         // we use an internal .ctor to ensure the SystemIcons can't de disposed
         private static readonly Icon[] icons = new Icon[6]
         {
-#if NETCORE
             // TODO: Decide which icons to use for this.
             new Icon("placeholder.ico", undisposable:true), // Application_Winlogo
             new Icon("placeholder.ico", undisposable:true), // Asterisk_Information
@@ -54,14 +53,6 @@ namespace System.Drawing
             new Icon("placeholder.ico", undisposable:true), // Exclamation_Warning
             new Icon("placeholder.ico", undisposable:true), // Question_
             new Icon("placeholder.ico", undisposable:true), // Shield_
-#else
-            new Icon("Mono.ico", undisposable:true),        // Application_Winlogo
-            new Icon("Information.ico", undisposable:true), // Asterisk_Information
-            new Icon("Error.ico", undisposable:true),       // Error_Hand
-            new Icon("Warning.ico", undisposable:true),     // Exclamation_Warning
-            new Icon("Question.ico", undisposable:true),    // Question_
-            new Icon("Shield.ico", undisposable:true),      // Shield_
-#endif
         };
 
         // note: same as WinLogo (for Mono)
index 84fc413..1abde82 100644 (file)
@@ -20,9 +20,9 @@ namespace System.Globalization.Tests
                 }
                 // Test the string overload for a surrogate pair or a single char
                 GetUnicodeCategory(testCase.Utf32CodeValue, new UnicodeCategory[] { testCase.GeneralCategory });
-#if netcoreapp
+#if NETCOREAPP
                 Assert.Equal(testCase.GeneralCategory, CharUnicodeInfo.GetUnicodeCategory(testCase.CodePoint));
-#endif // netcoreapp
+#endif
             }
         }
 
index 0d0b5ee..abbb768 100644 (file)
@@ -19,7 +19,7 @@ namespace System.IO.Pipelines
         private SynchronizationContext? _synchronizationContext;
         private ExecutionContext? _executionContext;
 
-#if !netstandard
+#if !NETSTANDARD2_0
         private CancellationToken CancellationToken => _cancellationTokenRegistration.Token;
 #else
         private CancellationToken _cancellationToken;
@@ -35,7 +35,7 @@ namespace System.IO.Pipelines
             _cancellationTokenRegistration = default;
             _synchronizationContext = null;
             _executionContext = null;
-#if netstandard
+#if NETSTANDARD2_0
             _cancellationToken = CancellationToken.None;
 #endif
         }
@@ -54,7 +54,7 @@ namespace System.IO.Pipelines
             // Don't register if already completed, we would immediately unregistered in ObserveCancellation
             if (cancellationToken.CanBeCanceled && !IsCompleted)
             {
-#if netstandard
+#if NETSTANDARD2_0
                 _cancellationToken = cancellationToken;
 #endif
                 _cancellationTokenRegistration = cancellationToken.UnsafeRegister(callback, state);
@@ -166,7 +166,7 @@ namespace System.IO.Pipelines
             cancellationToken = CancellationToken;
             CancellationTokenRegistration cancellationTokenRegistration = _cancellationTokenRegistration;
 
-#if netstandard
+#if NETSTANDARD2_0
             _cancellationToken = default;
 #endif
             _cancellationTokenRegistration = default;
index ab1025f..35541af 100644 (file)
@@ -68,7 +68,7 @@ namespace System.IO.Pipelines
             return ReadAsyncInternal(new Memory<byte>(buffer, offset, count), cancellationToken).AsTask();
         }
 
-#if !netstandard
+#if !NETSTANDARD2_0
         public override ValueTask<int> ReadAsync(Memory<byte> buffer, CancellationToken cancellationToken = default)
         {
             return ReadAsyncInternal(buffer, cancellationToken);
index 56a3126..872e5cd 100644 (file)
@@ -69,7 +69,7 @@ namespace System.IO.Pipelines
             return GetFlushResultAsTask(valueTask);
         }
 
-#if !netstandard
+#if !NETSTANDARD2_0
         public override ValueTask WriteAsync(ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken = default)
         {
             ValueTask<FlushResult> valueTask = _pipeWriter.WriteAsync(buffer, cancellationToken);
index dcd2aa0..fc30232 100644 (file)
@@ -237,7 +237,7 @@ namespace System.IO.Pipelines
 
             if (!_leaveOpen)
             {
-#if !netstandard
+#if !NETSTANDARD2_0
                 await InnerStream.DisposeAsync().ConfigureAwait(false);
 #else
                 InnerStream.Dispose();
@@ -356,7 +356,7 @@ namespace System.IO.Pipelines
 
                 if (returnSegment.Length > 0)
                 {
-#if !netstandard
+#if !NETSTANDARD2_0
                     InnerStream.Write(returnSegment.Memory.Span);
 #else
                     InnerStream.Write(returnSegment.Memory);
index b4e703f..b134551 100644 (file)
@@ -25,7 +25,7 @@ namespace System.IO.Pipelines.Tests
             return 0;
         }
 
-#if netcoreapp
+#if NETCOREAPP
         public override async ValueTask<int> ReadAsync(Memory<byte> buffer, CancellationToken cancellationToken = default)
         {
             await WaitForReadTask.Task;
index 71a519b..7d02a54 100644 (file)
@@ -24,7 +24,7 @@ namespace System.IO.Pipelines.Tests
             cancellationToken.ThrowIfCancellationRequested();
         }
 
-#if netcoreapp
+#if NETCOREAPP
         public override async ValueTask WriteAsync(ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken = default)
         {
             await WaitForWriteTask.Task;
index 71acdae..50fa41c 100644 (file)
@@ -33,7 +33,7 @@ namespace System.IO.Pipelines.Tests
             return Task.CompletedTask;
         }
 
-#if netcoreapp
+#if NETCOREAPP
         public override ValueTask WriteAsync(ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken = default)
         {
             if (_writes >= _maxWrites)
index 3807eef..74b22f9 100644 (file)
@@ -612,7 +612,7 @@ namespace System.IO.Pipelines.Tests
             {
                 throw new OperationCanceledException();
             }
-#if netcoreapp
+#if NETCOREAPP
             public override ValueTask<int> ReadAsync(Memory<byte> buffer, CancellationToken cancellationToken = default)
             {
                 throw new OperationCanceledException();
@@ -647,7 +647,7 @@ namespace System.IO.Pipelines.Tests
                 return bytes;
             }
 
-#if netcoreapp
+#if NETCOREAPP
             public override async ValueTask<int> ReadAsync(Memory<byte> destination, CancellationToken cancellationToken = default)
             {
                 if (_throwOnNextCallToRead)
index e113d5e..c9c85d9 100644 (file)
@@ -573,7 +573,7 @@ namespace System.IO.Pipelines.Tests
                 throw new OperationCanceledException();
             }
 
-#if netcoreapp
+#if NETCOREAPP
             public override ValueTask WriteAsync(ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken = default)
             {
                 throw new OperationCanceledException();
index cfe6f8a..792ce7e 100644 (file)
@@ -192,7 +192,7 @@ namespace System.Net.Http.Functional.Tests
         }
 
         [Theory]
-#if netcoreapp
+#if NETCOREAPP
         [InlineData(DecompressionMethods.Brotli, "br", "")]
         [InlineData(DecompressionMethods.Brotli, "br", "br")]
         [InlineData(DecompressionMethods.Brotli, "br", "gzip")]
index fba216d..55d7330 100644 (file)
@@ -105,7 +105,7 @@ namespace System.Net.Http.Functional.Tests
         }
 
         protected LoopbackServerFactory LoopbackServerFactory =>
-#if netcoreapp
+#if NETCOREAPP
             UseHttp2 ?
                 (LoopbackServerFactory)Http2LoopbackServerFactory.Singleton :
 #endif
index fbf0234..32c00aa 100644 (file)
@@ -97,7 +97,7 @@ namespace System.Net.Http.Functional.Tests
         protected override bool UseSocketsHttpHandler => false;
     }
 
-#if netcoreapp
+#if NETCOREAPP
     public sealed class PlatformHandler_HttpClientHandler_Decompression_Tests : HttpClientHandler_Decompression_Test
     {
         public PlatformHandler_HttpClientHandler_Decompression_Tests(ITestOutputHelper output) : base(output) { }
index 98ea27a..57e7980 100644 (file)
@@ -102,7 +102,7 @@ namespace System.Net.Http.Functional.Tests
             return TaskTimeoutExtensions.WhenAllOrAnyFailed(tasks, timeoutInMilliseconds);
         }
 
-#if netcoreapp
+#if NETCOREAPP
         public static Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> AllowAllCertificates = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator;
 #else
         public static Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> AllowAllCertificates = (_, __, ___, ____) => true;
index 0af7500..19b7eb0 100644 (file)
@@ -91,7 +91,7 @@ namespace System.Net.WebSockets.Tests
             Assert.Throws<PlatformNotSupportedException>(() => WebSocket.RegisterPrefixes());
         }
 
-#if netcoreapp
+#if NETCOREAPP
         [Fact]
         public static void IsApplicationTargeting45_AlwaysTrue()
         {
@@ -99,7 +99,7 @@ namespace System.Net.WebSockets.Tests
             Assert.True(WebSocket.IsApplicationTargeting45());
 #pragma warning restore 0618
         }
-#endif // netcoreapp
+#endif
 
         [Theory]
         [InlineData(WebSocketState.None)]
index 9856dc0..4c4dc85 100644 (file)
@@ -397,7 +397,7 @@ namespace DispatchProxyTests
             Assert.NotNull(propertyInfo);
         }
 
-#if netcoreapp
+#if NETCOREAPP
         [Fact]
         public static void Invoke_Event_Add_And_Remove_And_Raise_Invokes_Correct_Methods()
         {
@@ -445,7 +445,7 @@ namespace DispatchProxyTests
             Assert.True(invokedMethods[2] != null && expectedMethod == invokedMethods[2], String.Format("Third invoke should have been {0} but actual was {1}",
                             expectedMethod.Name, invokedMethods[1]));
         }
-#endif // netcoreapp
+#endif
 
         [Fact]
         public static void Proxy_Declares_Interface_Events()
index d82c0fe..8fd0fdb 100644 (file)
@@ -101,7 +101,7 @@ namespace System.Reflection.Metadata
         public System.Reflection.Metadata.StringHandle Name { get { throw null; } }
         public System.Reflection.Metadata.BlobHandle PublicKey { get { throw null; } }
         public System.Version Version { get { throw null; } }
-#if !NETSTANDARD11
+#if !NETSTANDARD1_1
         public System.Reflection.AssemblyName GetAssemblyName() { throw null; }
 #endif
         public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() { throw null; }
@@ -171,7 +171,7 @@ namespace System.Reflection.Metadata
         public System.Reflection.Metadata.StringHandle Name { get { throw null; } }
         public System.Reflection.Metadata.BlobHandle PublicKeyOrToken { get { throw null; } }
         public System.Version Version { get { throw null; } }
-#if !NETSTANDARD11
+#if !NETSTANDARD1_1
         public System.Reflection.AssemblyName GetAssemblyName() { throw null; }
 #endif
         public System.Reflection.Metadata.CustomAttributeHandleCollection GetCustomAttributes() { throw null; }
@@ -1256,7 +1256,7 @@ namespace System.Reflection.Metadata
     public partial class ImageFormatLimitationException : System.Exception
     {
         public ImageFormatLimitationException() { }
-#if !NETSTANDARD11
+#if !NETSTANDARD1_1
         protected ImageFormatLimitationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
 #endif
         public ImageFormatLimitationException(string message) { }
index a8cdf1c..54327dd 100644 (file)
@@ -2,7 +2,6 @@
   <PropertyGroup>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <CLSCompliant>false</CLSCompliant>
-    <DefineConstants Condition="'$(TargetGroup)' == 'netstandard1.1'">$(DefineConstants);NETSTANDARD11</DefineConstants>
     <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.1-Debug;netstandard1.1-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
   </PropertyGroup>
   <ItemGroup>
index 812e0a9..8181310 100644 (file)
@@ -6,7 +6,6 @@
     <DefaultLanguage>en-US</DefaultLanguage>
     <CLSCompliant>false</CLSCompliant>
     <TargetsNetCoreAppOrUap Condition="'$(TargetsNetCoreApp)'=='true' OR '$(TargetsUap)' == 'true'">true</TargetsNetCoreAppOrUap>
-    <DefineConstants Condition="'$(TargetGroup)' == 'netstandard1.1'">NETSTANDARD11</DefineConstants>
     <PackageTargetFramework Condition="'$(TargetGroup)' == 'netstandard1.1'">netstandard1.1;portable-net45+win8</PackageTargetFramework>
     <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.1-Debug;netstandard1.1-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release</Configurations>
   </PropertyGroup>
index f52f824..148e2a5 100644 (file)
@@ -19,7 +19,7 @@ namespace System.Reflection.Internal
             public DisposableData(IDisposable accessor, SafeBuffer safeBuffer, long offset)
             {
                 // Make sure the current thread isn't aborted in between acquiring the pointer and assigning the fields.
-#if !NETSTANDARD11
+#if !NETSTANDARD1_1
                 RuntimeHelpers.PrepareConstrainedRegions();
 #endif
                 try
@@ -40,7 +40,7 @@ namespace System.Reflection.Internal
             {
                 // Make sure the current thread isn't aborted in between zeroing the references and releasing/disposing.
                 // Safe buffer only frees the underlying resource if its ref count drops to zero, so we have to make sure it does.
-#if !NETSTANDARD11
+#if !NETSTANDARD1_1
                 RuntimeHelpers.PrepareConstrainedRegions();
 #endif
                 try
index 0915014..f944457 100644 (file)
@@ -23,7 +23,7 @@ namespace System.Reflection.Internal
             public DisposableData(int size)
             {
                 // make sure the current thread isn't aborted in between allocating and storing the pointer
-#if !NETSTANDARD11
+#if !NETSTANDARD1_1
                 RuntimeHelpers.PrepareConstrainedRegions();
 #endif
                 try
@@ -38,7 +38,7 @@ namespace System.Reflection.Internal
             protected override void Release()
             {
                 // make sure the current thread isn't aborted in between zeroing the pointer and freeing the memory
-#if !NETSTANDARD11
+#if !NETSTANDARD1_1
                 RuntimeHelpers.PrepareConstrainedRegions();
 #endif
                 try
index 8eddfd7..47ca623 100644 (file)
@@ -19,7 +19,7 @@ namespace System.Reflection.Internal
         public PinnedObject(object obj)
         {
             // Make sure the current thread isn't aborted in between allocating the handle and storing it.
-#if !NETSTANDARD11
+#if !NETSTANDARD1_1
             RuntimeHelpers.PrepareConstrainedRegions();
 #endif
             try
@@ -35,7 +35,7 @@ namespace System.Reflection.Internal
         protected override void Release()
         {
             // Make sure the current thread isn't aborted in between zeroing the handle and freeing it.
-#if !NETSTANDARD11
+#if !NETSTANDARD1_1
             RuntimeHelpers.PrepareConstrainedRegions();
 #endif
             try
index 68e20f4..9cc4785 100644 (file)
@@ -47,7 +47,7 @@ namespace System.Reflection.Metadata.Ecma335
         protected override void Release()
         {
             // Make sure the current thread isn't aborted in the middle of the operation.
-#if !NETSTANDARD11
+#if !NETSTANDARD1_1
             RuntimeHelpers.PrepareConstrainedRegions();
 #endif
             try
@@ -95,7 +95,7 @@ namespace System.Reflection.Metadata.Ecma335
             var blobs = GetBlobs();
 
             MemoryBlock result;
-#if !NETSTANDARD11
+#if !NETSTANDARD1_1
             RuntimeHelpers.PrepareConstrainedRegions();
 #endif
             try
index 19e9c98..8c41932 100644 (file)
@@ -9,7 +9,7 @@ namespace System.Reflection.Tests
 {
     internal static class NetCoreApiEmulators
     {
-#if netcoreapp
+#if NETCOREAPP
         public static bool IsSZArray(this Type t) => t.IsSZArray;
         public static bool IsVariableBoundArray(this Type t) => t.IsVariableBoundArray;
         public static bool IsTypeDefinition(this Type t) => t.IsTypeDefinition;
index 37441e2..e360a58 100644 (file)
@@ -297,7 +297,7 @@ namespace System.Reflection.Tests
             var loadedAssembly1 = Assembly.LoadFile(fullRuntimeTestsPath);
             Assert.NotEqual(currentAssembly, loadedAssembly1);
 
-#if netcoreapp
+#if NETCOREAPP
             System.Runtime.Loader.AssemblyLoadContext alc = System.Runtime.Loader.AssemblyLoadContext.GetLoadContext(loadedAssembly1);
             string expectedName = string.Format("Assembly.LoadFile({0})", fullRuntimeTestsPath);
             Assert.Equal(expectedName, alc.Name);
index dbca320..0c54c4b 100644 (file)
@@ -107,7 +107,7 @@ namespace System.Resources.Tests
 
         static int ResourcesAfAZEvents = 0;
 
-#if netcoreapp
+#if NETCOREAPP
         static System.Reflection.Assembly AssemblyResolvingEventHandler(System.Runtime.Loader.AssemblyLoadContext alc, System.Reflection.AssemblyName name)
         {
             if (name.FullName.StartsWith("System.Resources.ResourceManager.Tests.resources"))
@@ -133,7 +133,7 @@ namespace System.Resources.Tests
             {
                 if (name.Contains("Culture=af-ZA"))
                 {
-#if netcoreapp
+#if NETCOREAPP
                     Assert.Equal(1, ResourcesAfAZEvents);
 #else
                     Assert.Equal(0, ResourcesAfAZEvents);
@@ -158,7 +158,7 @@ namespace System.Resources.Tests
 
         private static void Remote_ExpectEvents()
         {
-#if netcoreapp
+#if NETCOREAPP
             System.Runtime.Loader.AssemblyLoadContext.Default.Resolving += AssemblyResolvingEventHandler;
 #endif
             AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(AssemblyResolveEventHandler);
@@ -172,7 +172,7 @@ namespace System.Resources.Tests
             string actual = resourceManager.GetString("One", culture);
             Assert.Equal("Value-One", actual);
 
-#if netcoreapp
+#if NETCOREAPP
             Assert.Equal(2, ResourcesAfAZEvents);
 #else
             Assert.Equal(1, ResourcesAfAZEvents);
index 3725285..c5b124e 100644 (file)
@@ -11,72 +11,6 @@ using System.Runtime.InteropServices;
 
 namespace System.Runtime.Caching
 {
-    // CoreClr 2.0 supports GC sized refs but does not expose System.SizedReference
-#if NETCOREAPP21
-    internal class SRef {
-        private static Type s_type = Type.GetType("System.SizedReference", true, false);
-        private Object _sizedRef;
-
-        internal SRef(Object target) {
-            _sizedRef = Activator.CreateInstance(s_type,
-                    BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.CreateInstance,
-                    null,
-                    new object[] { target },
-                    null);
-        }
-
-        internal long ApproximateSize {
-            get {
-                object o = s_type.InvokeMember("ApproximateSize",
-                                               BindingFlags.Public | BindingFlags.Instance | BindingFlags.GetProperty,
-                                               null, // binder
-                                               _sizedRef, // target
-                                               null, // args
-                                               CultureInfo.InvariantCulture);
-                return (long)o;
-            }
-        }
-
-        internal void Dispose() {
-            s_type.InvokeMember("Dispose",
-                                BindingFlags.Public | BindingFlags.Instance | BindingFlags.InvokeMethod,
-                                null, // binder
-                                _sizedRef, // target
-                                null, // args
-                                CultureInfo.InvariantCulture);
-        }
-    }
-
-    internal class SRefMultiple {
-        private SRef[] _srefs;
-        private long[] _sizes;  // Getting SRef size in the debugger is extremely tedious so we keep the last read value here
-
-        internal SRefMultiple(object[] targets) {
-            _srefs = new SRef[targets.Length];
-            _sizes = new long[targets.Length];
-            for (int i = 0; i < targets.Length; i++) {
-                _srefs[i] = new SRef(targets[i]);
-            }
-        }
-
-        internal long ApproximateSize {
-            get {
-                long size = 0;
-                for (int i = 0; i < _srefs.Length; i++) {
-                    size += (_sizes[i] = _srefs[i].ApproximateSize);
-                }
-                return size;
-            }
-        }
-
-        internal void Dispose() {
-            foreach (SRef s in _srefs) {
-                s.Dispose();
-            }
-        }
-    }
-
-#else
     // until then we provide a stub
     internal class SRefMultiple
     {
@@ -88,7 +22,6 @@ namespace System.Runtime.Caching
         {
         }
     }
-#endif
 
     internal class GCHandleRef<T> : IDisposable
     where T : class, IDisposable
index bf836a0..3e43f72 100644 (file)
@@ -62,7 +62,7 @@ using System.Reflection.Metadata;
 using System.Diagnostics.Eventing.Reader;
 
 // System.Text.Json is a .NET Core 3.0 specific library
-#if netcoreapp
+#if NETCOREAPP
 using System.Text.Json;
 #endif
 
@@ -495,7 +495,7 @@ namespace System.Runtime.Serialization.Formatters.Tests
             var isolatedStorageException = new IsolatedStorageException("message", exception);
             yield return new object[] { PopulateException(isolatedStorageException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAADJTeXN0ZW0uSU8uSXNvbGF0ZWRTdG9yYWdlLklzb2xhdGVkU3RvcmFnZUV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGAgAAADJTeXN0ZW0uSU8uSXNvbGF0ZWRTdG9yYWdlLklzb2xhdGVkU3RvcmFnZUV4Y2VwdGlvbgYDAAAAB21lc3NhZ2UJBAAAAAkFAAAABgYAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYHAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBggAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgkAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBAQAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQoAAAACAAAAAgAAAAQFAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBgsAAAAQU3lzdGVtLkV4Y2VwdGlvbgkDAAAACQ0AAAAJDgAAAAkGAAAACQcAAAAJCAAAAAAAAAAK6AMAAAkJAAAACgQKAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYTAAAABnNlY3JldAgBAQkUAAAAAQ0AAAAEAAAACRUAAAACAAAAAgAAAAEOAAAABQAAAAkLAAAABhcAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARQAAAAKAAAACAgBAAAABhgAAAADb25lCgEVAAAACgAAAAkTAAAACAEBCRoAAAABGgAAAAoAAAAICAEAAAAJGAAAAAoL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAADJTeXN0ZW0uSU8uSXNvbGF0ZWRTdG9yYWdlLklzb2xhdGVkU3RvcmFnZUV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGAgAAADJTeXN0ZW0uSU8uSXNvbGF0ZWRTdG9yYWdlLklzb2xhdGVkU3RvcmFnZUV4Y2VwdGlvbgYDAAAAB21lc3NhZ2UJBAAAAAkFAAAABgYAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYHAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBggAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgkAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBAQAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQoAAAACAAAAAgAAAAQFAAAAEFN5c3RlbS5FeGNlcHRpb24MAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cwEBAwMBAQEAAQABBylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCBgsAAAAQU3lzdGVtLkV4Y2VwdGlvbgkDAAAACQ0AAAAJDgAAAAkGAAAACQcAAAAJCAAAAAAAAAAK6AMAAAkJAAAACgQKAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYTAAAABnNlY3JldAgBAQkUAAAAAQ0AAAAEAAAACRUAAAACAAAAAgAAAAEOAAAABQAAAAkLAAAABhcAAAAXSW5uZXIgZXhjZXB0aW9uIG1lc3NhZ2UKCgoKCgAAAAAKABUTgAoKARQAAAAKAAAACAgBAAAABhgAAAADb25lCgEVAAAACgAAAAkTAAAACAEBCRoAAAABGgAAAAoAAAAICAEAAAAJGAAAAAoL", TargetFrameworkMoniker.netfx461) } };
 
-#if netcoreapp
+#if NETCOREAPP
             var jsonException = new JsonException("message", path: "path", lineNumber: 1, bytePositionInLine: 2, innerException: exception);
             yield return new object[] { PopulateException(jsonException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFNTeXN0ZW0uVGV4dC5Kc29uLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Y2M3YjEzZmZjZDJkZGQ1MQUBAAAAHlN5c3RlbS5UZXh0Lkpzb24uSnNvbkV4Y2VwdGlvbhAAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzCkxpbmVOdW1iZXISQnl0ZVBvc2l0aW9uSW5MaW5lBFBhdGgNQWN0dWFsTWVzc2FnZQEBAwMBAQEAAQABBwMDAQEpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgxTeXN0ZW0uSW50NjQMU3lzdGVtLkludDY0AgAAAAYDAAAAHlN5c3RlbS5UZXh0Lkpzb24uSnNvbkV4Y2VwdGlvbgYEAAAAB21lc3NhZ2UJBQAAAAkGAAAABgcAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYIAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBgkAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgoAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKCAkBAAAAAAAAAAgJAgAAAAAAAAAGCwAAAARwYXRoCQQAAAAEBQAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDQAAAAIAAAACAAAABAYAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDgAAABBTeXN0ZW0uRXhjZXB0aW9uCQQAAAAJEAAAAAkRAAAACQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAKBA0AAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhYAAAAGc2VjcmV0CAEBCRcAAAABEAAAAAUAAAAJGAAAAAIAAAACAAAAAREAAAAGAAAACQ4AAAAGGgAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFwAAAA0AAAAICAEAAAAGGwAAAANvbmUKARgAAAANAAAACRYAAAAIAQEJHQAAAAEdAAAADQAAAAgIAQAAAAkbAAAACgs=", TargetFrameworkMoniker.netcoreapp30) } };
 
@@ -686,7 +686,7 @@ namespace System.Runtime.Serialization.Formatters.Tests
             var smtpFailedRecipientsException = new SmtpFailedRecipientsException("message", new SmtpFailedRecipientException[] { smtpFailedRecipientException });
             yield return new object[] { PopulateException(smtpFailedRecipientsException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAElTeXN0ZW0sIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAtU3lzdGVtLk5ldC5NYWlsLlNtdHBGYWlsZWRSZWNpcGllbnRzRXhjZXB0aW9uDwAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMGU3RhdHVzD2ZhaWxlZFJlY2lwaWVudA9pbm5lckV4Y2VwdGlvbnMBAQMEAQEBAAEAAQcAAQQpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwsU3lzdGVtLk5ldC5NYWlsLlNtdHBGYWlsZWRSZWNpcGllbnRFeGNlcHRpb24CAAAACAgCCC5TeXN0ZW0uTmV0Lk1haWwuU210cEZhaWxlZFJlY2lwaWVudEV4Y2VwdGlvbltdAgAAAAIAAAAGAwAAAC1TeXN0ZW0uTmV0Lk1haWwuU210cEZhaWxlZFJlY2lwaWVudHNFeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCv////8GCwAAAA9mYWlsZWRSZWNpcGllbnQJDAAAAAQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkNAAAAAgAAAAIAAAAFBgAAACxTeXN0ZW0uTmV0Lk1haWwuU210cEZhaWxlZFJlY2lwaWVudEV4Y2VwdGlvbg4AAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzBlN0YXR1cw9mYWlsZWRSZWNpcGllbnQBAQMDAQEBAAEAAQcAASlTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCCAIAAAAGDgAAACxTeXN0ZW0uTmV0Lk1haWwuU210cEZhaWxlZFJlY2lwaWVudEV4Y2VwdGlvbgYPAAAAMkNvbXBsZXRlZC4gVGhlIHNlcnZlciByZXNwb25zZSB3YXM6IHNlcnZlclJlc3BvbnNlCRAAAAAKCQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAK+gAAAAkLAAAABwwAAAAAAQAAAAEAAAAELFN5c3RlbS5OZXQuTWFpbC5TbXRwRmFpbGVkUmVjaXBpZW50RXhjZXB0aW9uAgAAAAkGAAAABA0AAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhcAAAAGc2VjcmV0CAEBCRgAAAABEAAAAAUAAAAJGQAAAAIAAAACAAAAARgAAAANAAAACAgBAAAABhoAAAADb25lCgEZAAAADQAAAAkXAAAACAEBCRwAAAABHAAAAA0AAAAICAEAAAAJGgAAAAoL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAElTeXN0ZW0sIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAtU3lzdGVtLk5ldC5NYWlsLlNtdHBGYWlsZWRSZWNpcGllbnRzRXhjZXB0aW9uDwAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMGU3RhdHVzD2ZhaWxlZFJlY2lwaWVudA9pbm5lckV4Y2VwdGlvbnMBAQMEAQEBAAEAAQcAAQQpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwsU3lzdGVtLk5ldC5NYWlsLlNtdHBGYWlsZWRSZWNpcGllbnRFeGNlcHRpb24CAAAACAgCCC5TeXN0ZW0uTmV0Lk1haWwuU210cEZhaWxlZFJlY2lwaWVudEV4Y2VwdGlvbltdAgAAAAIAAAAGAwAAAC1TeXN0ZW0uTmV0Lk1haWwuU210cEZhaWxlZFJlY2lwaWVudHNFeGNlcHRpb24GBAAAAAdtZXNzYWdlCQUAAAAJBgAAAAYHAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GCAAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYJAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYKAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCv////8GCwAAAA9mYWlsZWRSZWNpcGllbnQJDAAAAAQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkNAAAAAgAAAAIAAAAFBgAAACxTeXN0ZW0uTmV0Lk1haWwuU210cEZhaWxlZFJlY2lwaWVudEV4Y2VwdGlvbg4AAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzBlN0YXR1cw9mYWlsZWRSZWNpcGllbnQBAQMDAQEBAAEAAQcAASlTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCCAIAAAAGDgAAACxTeXN0ZW0uTmV0Lk1haWwuU210cEZhaWxlZFJlY2lwaWVudEV4Y2VwdGlvbgYPAAAAMkNvbXBsZXRlZC4gVGhlIHNlcnZlciByZXNwb25zZSB3YXM6IHNlcnZlclJlc3BvbnNlCRAAAAAKCQcAAAAJCAAAAAkJAAAAAAAAAAroAwAACQoAAAAK+gAAAAkLAAAABwwAAAAAAQAAAAEAAAAELFN5c3RlbS5OZXQuTWFpbC5TbXRwRmFpbGVkUmVjaXBpZW50RXhjZXB0aW9uAgAAAAkGAAAABA0AAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhcAAAAGc2VjcmV0CAEBCRgAAAABEAAAAAUAAAAJGQAAAAIAAAACAAAAARgAAAANAAAACAgBAAAABhoAAAADb25lCgEZAAAADQAAAAkXAAAACAEBCRwAAAABHAAAAA0AAAAICAEAAAAJGgAAAAoL", TargetFrameworkMoniker.netfx461) } };
 
-#if netcoreapp
+#if NETCOREAPP
             var ambiguousImplementationException = new AmbiguousImplementationException();
             yield return new object[] { PopulateException(ambiguousImplementationException, false), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAFFTeXN0ZW0uUnVudGltZSwgVmVyc2lvbj00LjIuMS4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWIwM2Y1ZjdmMTFkNTBhM2EFAQAAAC9TeXN0ZW0uUnVudGltZS5BbWJpZ3VvdXNJbXBsZW1lbnRhdGlvbkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAICAAAABgMAAAAvU3lzdGVtLlJ1bnRpbWUuQW1iaWd1b3VzSW1wbGVtZW50YXRpb25FeGNlcHRpb24GBAAAAB9BbWJpZ3VvdXMgaW1wbGVtZW50YXRpb24gZm91bmQuCQUAAAAKBgYAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYHAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBggAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAApqEBOABgkAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKBAUAAAApU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwDAAAABGhlYWQHdmVyc2lvbgVjb3VudAMAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQgICQoAAAACAAAAAgAAAAQKAAAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlAwAAAANrZXkFdmFsdWUEbmV4dAICAzhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQYLAAAABnNlY3JldAgBAQkMAAAAAQwAAAAKAAAACAgBAAAABg0AAAADb25lCgs=", TargetFrameworkMoniker.netcoreapp30) } };
             var switchExpressionException = new SwitchExpressionException(34);
index cd6ef43..a555658 100644 (file)
@@ -26,7 +26,7 @@ using System.Threading;
 using Xunit;
 
 // System.Text.Json is a .NET Core 3.0 specific library
-#if netcoreapp
+#if NETCOREAPP
 using System.Text.Json;
 #endif
 
@@ -1204,7 +1204,7 @@ namespace System.Runtime.Serialization.Formatters.Tests
             @this.InnerExceptions.CheckSequenceEquals(other.InnerExceptions, isSamePlatform);
         }
 
-#if netcoreapp
+#if NETCOREAPP
         public static void IsEqual(this JsonException @this, JsonException other, bool isSamePlatform)
         {
             if (@this == null && other == null)
index fd4d274..7032ef3 100644 (file)
@@ -273,7 +273,7 @@ namespace System.Resources
                    (libpath[packagepath.Length] == '\\' || packagepath.EndsWith("\\"));
         }
 
-#if netstandard
+#if NETSTANDARD2_0
         /* Returns true if libpath is path to an ni image and if the path contains packagename as a subfolder */
         private static bool LibpathContainsPackagename(string libpath, string packagename)
         {
@@ -305,7 +305,7 @@ namespace System.Resources
                 }
             }
 
-#if netstandard
+#if NETSTANDARD2_0
             /* On phone libpath is usually ni path and not IL path as we do not touch the IL on phone.
                On Phone NI images are no longer under package root. Due to this above logic fails to
                find the package to which the library belongs. We assume that NI paths usually have
@@ -363,7 +363,7 @@ namespace System.Resources
                 {
                     string packageSimpleName = FindPackageSimpleNameForFilename(libpath);
 
-#if netstandard
+#if NETSTANDARD2_0
                     // If we have found a simple package name for the assembly, lets make sure it is not *.resource.dll that
                     // an application may have packaged in its AppX. This is to enforce AppX apps to use PRI resources.
                     if (packageSimpleName != null)
@@ -376,7 +376,7 @@ namespace System.Resources
                             packageSimpleName = null;
                         }
                     }
-#endif //  netstandard
+#endif
                     if (packageSimpleName != null)
                     {
                         ResourceMap packageResourceMap = null;
index 698d95a..a32ac63 100644 (file)
@@ -119,7 +119,7 @@ namespace System.Tests
             Assert.Throws<AmbiguousMatchException>(() => Activator.CreateInstance(typeof(Choice1), new object[] { null }));
         }
 
-#if netcoreapp
+#if NETCOREAPP
         [Fact]
         public void CreateInstance_NotRuntimeType_ThrowsArgumentException()
         {
@@ -130,7 +130,7 @@ namespace System.Tests
                 AssertExtensions.Throws<ArgumentException>("type", () => Activator.CreateInstance(nonRuntimeType, new object[0]));
             }
         }
-#endif // netcoreapp
+#endif
 
         public static IEnumerable<object[]> CreateInstance_ContainsGenericParameters_TestData()
         {
index 51b86c1..ca353e2 100644 (file)
@@ -77,7 +77,7 @@ namespace System.Tests
             yield return new object[] { ulong.MinValue.ToString(), false, (UInt64Enum)ulong.MinValue };
             yield return new object[] { ulong.MaxValue.ToString(), false, (UInt64Enum)ulong.MaxValue };
 
-#if netcoreapp
+#if NETCOREAPP
             // Char
             yield return new object[] { "Value1", false, Enum.ToObject(s_charEnumType, (char)1) };
             yield return new object[] { "vaLue2", true, Enum.ToObject(s_charEnumType, (char)2) };
@@ -97,7 +97,7 @@ namespace System.Tests
                 yield return new object[] { "Value1", false, Enum.GetValues(s_doubleEnumType).GetValue(0) };
                 yield return new object[] { "vaLue2", true, Enum.GetValues(s_doubleEnumType).GetValue(0) };
             }
-#endif // netcoreapp
+#endif
 
             // SimpleEnum
             yield return new object[] { "Red", false, SimpleEnum.Red };
@@ -186,7 +186,7 @@ namespace System.Tests
             yield return new object[] { typeof(UInt64Enum), "-1", false, typeof(OverflowException) };
             yield return new object[] { typeof(UInt64Enum), "18446744073709551616", false, typeof(OverflowException) };
 
-#if netcoreapp
+#if NETCOREAPP
             // Char
             yield return new object[] { s_charEnumType, ((char)1).ToString(), false, typeof(ArgumentException) };
             yield return new object[] { s_charEnumType, ((char)5).ToString(), false, typeof(ArgumentException) };
@@ -212,7 +212,7 @@ namespace System.Tests
             // UIntPtr
             yield return new object[] { s_uintPtrEnumType, "1", false, typeof(InvalidCastException) };
             yield return new object[] { s_uintPtrEnumType, "5", false, typeof(InvalidCastException) };
-#endif // netcoreapp
+#endif
         }
 
         [Theory]
@@ -335,7 +335,7 @@ namespace System.Tests
             yield return new object[] { typeof(UInt64Enum), ulong.MaxValue, "Max" };
             yield return new object[] { typeof(UInt64Enum), 3UL, null };
 
-#if netcoreapp
+#if NETCOREAPP
             // Char
             yield return new object[] { s_charEnumType, Enum.Parse(s_charEnumType, "Value1"), "Value1" };
             yield return new object[] { s_charEnumType, Enum.Parse(s_charEnumType, "Value2"), "Value2" };
@@ -348,7 +348,7 @@ namespace System.Tests
             yield return new object[] { s_boolEnumType, Enum.Parse(s_boolEnumType, "Value2"), "Value2" };
             yield return new object[] { s_boolEnumType, true, "Value1" };
             yield return new object[] { s_boolEnumType, false, "Value2" };
-#endif // netcoreapp
+#endif
         }
 
         [Theory]
@@ -494,7 +494,7 @@ namespace System.Tests
             yield return new object[] { typeof(UInt64Enum), (ulong)1, true };
             yield return new object[] { typeof(UInt64Enum), (ulong)99, false };
 
-#if netcoreapp
+#if NETCOREAPP
             // Char
             yield return new object[] { s_charEnumType, "Value1", true };
             yield return new object[] { s_charEnumType, "None", false };
@@ -509,7 +509,7 @@ namespace System.Tests
             yield return new object[] { s_boolEnumType, "Value1", true };
             yield return new object[] { s_boolEnumType, true, true };
             yield return new object[] { s_boolEnumType, false, true };
-#endif // netcoreapp
+#endif
         }
 
         [Theory]
@@ -613,7 +613,7 @@ namespace System.Tests
             yield return new object[] { (UInt64Enum)0x3f06, (UInt64Enum)0x0010, false };
             yield return new object[] { (UInt64Enum)0x3f06, (UInt64Enum)0x3f16, false };
 
-#if netcoreapp
+#if NETCOREAPP
             // Char
             yield return new object[] { Enum.Parse(s_charEnumType, "Value0x3f06"), Enum.Parse(s_charEnumType, "Value0x3000"), true };
             yield return new object[] { Enum.Parse(s_charEnumType, "Value0x3f06"), Enum.Parse(s_charEnumType, "Value0x0f06"), true };
@@ -664,7 +664,7 @@ namespace System.Tests
             yield return new object[] { Enum.ToObject(s_uintPtrEnumType, 0x3f06), Enum.ToObject(s_uintPtrEnumType, 0x3f06), true };
             yield return new object[] { Enum.ToObject(s_uintPtrEnumType, 0x3f06), Enum.ToObject(s_uintPtrEnumType, 0x0010), false };
             yield return new object[] { Enum.ToObject(s_uintPtrEnumType, 0x3f06), Enum.ToObject(s_uintPtrEnumType, 0x3f16), false };
-#endif // netcoreapp
+#endif
         }
 
         [Theory]
@@ -729,7 +729,7 @@ namespace System.Tests
             yield return new object[] { typeof(UInt64Enum), (ulong)77, (UInt64Enum)77 };
             yield return new object[] { typeof(UInt64Enum), (ulong)0x0123456789abcdefL, (UInt64Enum)0x0123456789abcdefL };
 
-#if netcoreapp
+#if NETCOREAPP
             // Char
             yield return new object[] { s_charEnumType, (char)1, Enum.Parse(s_charEnumType, "Value1") };
             yield return new object[] { s_charEnumType, (char)2, Enum.Parse(s_charEnumType, "Value2") };
@@ -737,7 +737,7 @@ namespace System.Tests
             // Bool
             yield return new object[] { s_boolEnumType, true, Enum.Parse(s_boolEnumType, "Value1") };
             yield return new object[] { s_boolEnumType, false, Enum.Parse(s_boolEnumType, "Value2") };
-#endif // netcoreapp
+#endif
         }
 
         [Theory]
@@ -752,9 +752,9 @@ namespace System.Tests
             yield return new object[] { null, typeof(ArgumentNullException) };
             yield return new object[] { typeof(Enum), typeof(ArgumentException) };
             yield return new object[] { typeof(object), typeof(ArgumentException) };
-#if netcoreapp
+#if NETCOREAPP
             yield return new object[] { GetNonRuntimeEnumTypeBuilder(typeof(int)), typeof(ArgumentException) };
-#endif // netcoreapp
+#endif
         }
 
         [Theory]
@@ -777,12 +777,12 @@ namespace System.Tests
         {
             yield return new object[] { typeof(SimpleEnum), null, typeof(ArgumentNullException) };
             yield return new object[] { typeof(SimpleEnum), "Hello", typeof(ArgumentException) };
-#if netcoreapp
+#if NETCOREAPP
             yield return new object[] { s_floatEnumType, 1.0f, typeof(ArgumentException) };
             yield return new object[] { s_doubleEnumType, 1.0, typeof(ArgumentException) };
             yield return new object[] { s_intPtrEnumType, (IntPtr)1, typeof(ArgumentException) };
             yield return new object[] { s_uintPtrEnumType, (UIntPtr)1, typeof(ArgumentException) };
-#endif // netcoreapp
+#endif
         }
 
         [Theory]
@@ -863,7 +863,7 @@ namespace System.Tests
             yield return new object[] { UInt64Enum.One, new object(), false };
             yield return new object[] { UInt64Enum.One, null, false };
 
-#if netcoreapp
+#if NETCOREAPP
             // Char
             yield return new object[] { Enum.Parse(s_charEnumType, "Value1"), Enum.Parse(s_charEnumType, "Value1"), true };
             yield return new object[] { Enum.Parse(s_charEnumType, "Value1"), Enum.Parse(s_charEnumType, "Value2"), false };
@@ -911,7 +911,7 @@ namespace System.Tests
             yield return new object[] { Enum.ToObject(s_uintPtrEnumType, 1), (UIntPtr)1, false };
             yield return new object[] { Enum.ToObject(s_uintPtrEnumType, 1), new object(), false };
             yield return new object[] { Enum.ToObject(s_uintPtrEnumType, 1), null, false };
-#endif // netcoreapp
+#endif
         }
 
         [Theory]
@@ -973,7 +973,7 @@ namespace System.Tests
             yield return new object[] { UInt64Enum.One, UInt64Enum.Max, -1 };
             yield return new object[] { UInt64Enum.One, null, 1 };
 
-#if netcoreapp
+#if NETCOREAPP
             // Char
             yield return new object[] { Enum.Parse(s_charEnumType, "Value2"), Enum.Parse(s_charEnumType, "Value2"), 0 };
             yield return new object[] { Enum.Parse(s_charEnumType, "Value2"), Enum.Parse(s_charEnumType, "Value1"), 1 };
@@ -1009,7 +1009,7 @@ namespace System.Tests
             yield return new object[] { Enum.ToObject(s_uintPtrEnumType, 1), Enum.ToObject(s_uintPtrEnumType, 2), -1 };
             yield return new object[] { Enum.ToObject(s_uintPtrEnumType, 3), Enum.ToObject(s_uintPtrEnumType, 2), 1 };
             yield return new object[] { Enum.ToObject(s_uintPtrEnumType, 1), null, 1 };
-#endif // netcoreapp
+#endif
         }
 
         [Theory]
@@ -1036,14 +1036,14 @@ namespace System.Tests
             yield return new object[] { typeof(UInt32Enum), typeof(uint) };
             yield return new object[] { typeof(Int64Enum), typeof(long) };
             yield return new object[] { typeof(UInt64Enum), typeof(ulong) };
-#if netcoreapp
+#if NETCOREAPP
             yield return new object[] { s_charEnumType, typeof(char) };
             yield return new object[] { s_boolEnumType, typeof(bool) };
             yield return new object[] { s_floatEnumType, typeof(float) };
             yield return new object[] { s_doubleEnumType, typeof(double) };
             yield return new object[] { s_intPtrEnumType, typeof(IntPtr) };
             yield return new object[] { s_uintPtrEnumType, typeof(UIntPtr) };
-#endif // netcoreapp
+#endif
         }
 
         [Theory]
@@ -1134,7 +1134,7 @@ namespace System.Tests
                 new object[] { UInt64Enum.Min, UInt64Enum.One, UInt64Enum.Two, UInt64Enum.Max }
             };
 
-#if netcoreapp
+#if NETCOREAPP
             // Char
             yield return new object[]
             {
@@ -1182,7 +1182,7 @@ namespace System.Tests
                 new string[0],
                 new object[0]
             };
-#endif // netcoreapp
+#endif
         }
 
         [Theory]
@@ -1277,7 +1277,7 @@ namespace System.Tests
             yield return new object[] { (UInt64Enum)99, "D", "99" };
             yield return new object[] { UInt64Enum.Max, "D", "18446744073709551615" };
 
-#if netcoreapp
+#if NETCOREAPP
             // "D": Char
             yield return new object[] { Enum.ToObject(s_charEnumType, (char)0), "D", ((char)0).ToString() };
             yield return new object[] { Enum.ToObject(s_charEnumType, (char)1), "D", ((char)1).ToString() };
@@ -1298,7 +1298,7 @@ namespace System.Tests
             yield return new object[] { Enum.ToObject(s_doubleEnumType, 0), "D", "0" };
             yield return new object[] { Enum.ToObject(s_doubleEnumType, 1), "D", double.Epsilon.ToString() };
             yield return new object[] { Enum.ToObject(s_doubleEnumType, long.MaxValue), "D", double.NaN.ToString() };
-#endif // netcoreapp
+#endif
 
             // "D": SimpleEnum
             yield return new object[] { SimpleEnum.Red, "D", "1" };
@@ -1359,7 +1359,7 @@ namespace System.Tests
             yield return new object[] { (UInt64Enum)99, "X", "0000000000000063" };
             yield return new object[] { UInt64Enum.Max, "X", "FFFFFFFFFFFFFFFF" };
 
-#if netcoreapp
+#if NETCOREAPP
             // "X": Char
             yield return new object[] { Enum.ToObject(s_charEnumType, (char)0), "X", "0000" };
             yield return new object[] { Enum.ToObject(s_charEnumType, (char)1), "X", "0001" };
@@ -1371,7 +1371,7 @@ namespace System.Tests
             yield return new object[] { Enum.ToObject(s_boolEnumType, false), "X", "00" };
             yield return new object[] { Enum.ToObject(s_boolEnumType, true), "X", "01" };
             yield return new object[] { Enum.ToObject(s_boolEnumType, 123), "X", "01" };
-#endif // netcoreapp
+#endif
 
             // "X": SimpleEnum
             yield return new object[] { SimpleEnum.Red, "X", "00000001" };
@@ -1424,7 +1424,7 @@ namespace System.Tests
             yield return new object[] { (UInt64Enum)5, "F", "5" };
             yield return new object[] { UInt64Enum.Max, "F", "Max" };
 
-#if netcoreapp
+#if NETCOREAPP
             // "F": Char
             yield return new object[] { Enum.ToObject(s_charEnumType, (char)1), "F", "Value1" };
             yield return new object[] { Enum.ToObject(s_charEnumType, (char)(1 | 2)), "F", "Value1, Value2" };
@@ -1440,7 +1440,7 @@ namespace System.Tests
 
             // "F": UIntPtr
             yield return new object[] { Enum.ToObject(s_uintPtrEnumType, 5), "F", "5" };
-#endif // netcoreapp
+#endif
 
             // "F": SimpleEnum
             yield return new object[] { SimpleEnum.Red, "F", "Red" };
@@ -1451,7 +1451,7 @@ namespace System.Tests
             // "F": Flags Attribute
             yield return new object[] { AttributeTargets.Class | AttributeTargets.Delegate, "F", "Class, Delegate" };
 
-#if netcoreapp
+#if NETCOREAPP
             // "G": Char
             yield return new object[] { Enum.ToObject(s_charEnumType, char.MaxValue), "G", char.MaxValue.ToString() };
 #endif
index 7030a84..51fd0f5 100644 (file)
@@ -74,14 +74,14 @@ namespace System.Tests
 
         public static IEnumerable<object[]> UnsupportedEnumType_TestData()
         {
-#if netcoreapp
+#if NETCOREAPP
             yield return new object[] { s_floatEnumType, 1.0f };
             yield return new object[] { s_doubleEnumType, 1.0 };
             yield return new object[] { s_intPtrEnumType, (IntPtr)1 };
             yield return new object[] { s_uintPtrEnumType, (UIntPtr)1 };
 #else
             return Array.Empty<object[]>();
-#endif //netcoreapp
+#endif
         }
 
         [Theory]
@@ -102,14 +102,14 @@ namespace System.Tests
 
         public static IEnumerable<object[]> UnsupportedEnum_TestData()
         {
-#if netcoreapp
+#if NETCOREAPP
             yield return new object[] { Enum.ToObject(s_floatEnumType, 1) };
             yield return new object[] { Enum.ToObject(s_doubleEnumType, 2) };
             yield return new object[] { Enum.ToObject(s_intPtrEnumType, 1) };
             yield return new object[] { Enum.ToObject(s_uintPtrEnumType, 2) };
 #else
             return Array.Empty<object[]>();
-#endif //netcoreapp
+#endif
         }
 
         [Theory]
index ad29060..a770eb2 100644 (file)
@@ -13,7 +13,7 @@ namespace System.Security.Cryptography.Dsa.Tests
 
         public DSA Create(int keySize)
         {
-#if netcoreapp
+#if NETCOREAPP
             return DSA.Create(keySize);
 #else
             DSA dsa = Create();
index c4a5ad5..76a6a00 100644 (file)
@@ -20,7 +20,7 @@ namespace System.Security.Cryptography.EcDsa.Tests
             return ec;
         }
 
-#if netcoreapp
+#if NETCOREAPP
         public ECDsa Create(ECCurve curve)
         {
             return ECDsa.Create(curve);
index a1ee143..d097dba 100644 (file)
@@ -14,7 +14,7 @@ namespace System.Security.Cryptography.Rsa.Tests
 
         public RSA Create(int keySize)
         {
-#if netcoreapp
+#if NETCOREAPP
             return RSA.Create(keySize);
 #else
             RSA rsa = Create();
index 3117652..c1d8962 100644 (file)
@@ -82,7 +82,7 @@ namespace System.Security.Cryptography.DeriveBytesTests
             Assert.Throws<ArgumentOutOfRangeException>(() => new Rfc2898DeriveBytes(TestPassword, s_testSalt, int.MinValue / 2));
         }
 
-#if netcoreapp
+#if NETCOREAPP
         [Fact]
         public static void Ctor_EmptyAlgorithm()
         {
@@ -345,7 +345,7 @@ namespace System.Security.Cryptography.DeriveBytesTests
                 });
         }
 
-#if netcoreapp
+#if NETCOREAPP
         [Theory]
         [MemberData(nameof(KnownValuesTestCases))]
         public static void GetBytes_KnownValues_WithAlgorithm(KnownValuesTestCase testCase)
index 67c5d7b..1942f26 100644 (file)
@@ -16,7 +16,7 @@ namespace System.Security.Cryptography.EcDiffieHellman.Tests
             return new ECDiffieHellmanCng(keySize);
         }
 
-#if netcoreapp
+#if NETCOREAPP
         public ECDiffieHellman Create(ECCurve curve)
         {
             return new ECDiffieHellmanCng(curve);
index aea48b4..8d805a4 100644 (file)
@@ -14,7 +14,7 @@ namespace System.Security.Cryptography.EcDiffieHellman.Tests
             return new ECDiffieHellmanCng();
         }
 
-#if netcoreapp
+#if NETCOREAPP
         [Fact]
         public static void ECCurve_ctor()
         {
index 0822623..403f1ba 100644 (file)
@@ -47,7 +47,7 @@ namespace System.Security.Cryptography.Cng.Tests
             }
         }
 
-#if netcoreapp
+#if NETCOREAPP
         [ConditionalTheory(nameof(ECExplicitCurvesSupported)), MemberData(nameof(TestCurves))]
         public static void TestHashRoundTrip(CurveDef curveDef)
         {
@@ -70,6 +70,6 @@ namespace System.Security.Cryptography.Cng.Tests
                 Assert.Equal(0xFF, param2.Curve.Seed[0]);
             }
         }
-#endif // netcoreapp
+#endif
     }
 }
index fcc4eec..b0dc502 100644 (file)
@@ -16,7 +16,7 @@ namespace System.Security.Cryptography.EcDsa.Tests
             return new ECDsaCng(keySize);
         }
 
-#if netcoreapp
+#if NETCOREAPP
         public ECDsa Create(ECCurve curve)
         {
             return new ECDsaCng(curve);
index eeb7308..40b0cc2 100644 (file)
@@ -157,7 +157,7 @@ namespace System.Security.Cryptography.Cng.Tests
                Assert.Equal(CngAlgorithm.Sha256, cng.HashAlgorithm);
         }
 
-#if netcoreapp
+#if NETCOREAPP
         [Fact]
         public static void TestPositive256WithBlob()
         {
@@ -212,7 +212,7 @@ namespace System.Security.Cryptography.Cng.Tests
                 Assert.Equal(algorithm, cng.Key.Algorithm);
             }
         }
-#endif // netcoreapp
+#endif
 
         public static IEnumerable<object[]> SpecialNistKeys
         {
index 23ad115..e47a64c 100644 (file)
@@ -37,7 +37,7 @@ namespace System.Security.Cryptography.Cng.Tests
             }
         }
 
-#if netcoreapp
+#if NETCOREAPP
         [Fact]
         public static void SafeNCryptKeyHandle_ParentHandle_Invalid()
         {
index 40a82d9..a9d15ea 100644 (file)
@@ -189,7 +189,7 @@ namespace Internal.Cryptography.Pal.AnyOS
                 return null;
             }
 
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
             byte[] cek = null;
             int cekLength = 0;
 
index cb63de1..2d64217 100644 (file)
@@ -75,7 +75,7 @@ namespace Internal.Cryptography.Pal.AnyOS
                 return (T)(object)certificate.GetRSAPrivateKey();
             if (typeof(T) == typeof(ECDsa))
                 return (T)(object)certificate.GetECDsaPrivateKey();
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
             if (typeof(T) == typeof(DSA))
                 return (T)(object)certificate.GetDSAPrivateKey();
 #endif
index 486a628..89ceedc 100644 (file)
@@ -22,7 +22,7 @@ namespace Internal.Cryptography
     {
         private static readonly byte[] s_pSpecifiedDefaultParameters = { 0x04, 0x00 };
 
-#if !netcoreapp && !netcoreapp30 && !netstandard21
+#if !NETCOREAPP && !NETSTANDARD2_1
         // Compatibility API.
         internal static void AppendData(this IncrementalHash hasher, ReadOnlySpan<byte> data)
         {
@@ -324,7 +324,7 @@ namespace Internal.Cryptography
             return ToUpperHexString(serialBytes);
         }
 
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
         private static unsafe string ToUpperHexString(ReadOnlySpan<byte> ba)
         {
             fixed (byte* baPtr = ba)
@@ -416,7 +416,7 @@ namespace Internal.Cryptography
                     attributeObject = Upgrade<Pkcs9MessageDigest>(attributeObject);
                     break;
 
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                 case Oids.LocalKeyId:
                     attributeObject = Upgrade<Pkcs9LocalKeyId>(attributeObject);
                     break;
index 6904cb7..56c2f81 100644 (file)
@@ -15,7 +15,7 @@ namespace System.Security.Cryptography.Pkcs
         {
         }
 
-#if netstandard
+#if NETSTANDARD2_0
         internal
 #else
         public
@@ -27,7 +27,7 @@ namespace System.Security.Cryptography.Pkcs
             RSAEncryptionPadding = rsaEncryptionPadding ?? throw new ArgumentNullException(nameof(rsaEncryptionPadding));
         }
 
-#if netstandard
+#if NETSTANDARD2_0
         internal
 #else
         public
@@ -61,7 +61,7 @@ namespace System.Security.Cryptography.Pkcs
             Certificate = certificate;
         }
 
-#if netstandard
+#if NETSTANDARD2_0
         internal
 #else
         public
index 1cead24..e4b23c1 100644 (file)
@@ -37,7 +37,7 @@ namespace System.Security.Cryptography.Pkcs
             }
 
             internal override bool VerifySignature(
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                 ReadOnlySpan<byte> valueHash,
                 ReadOnlyMemory<byte> signature,
 #else
@@ -68,7 +68,7 @@ namespace System.Security.Cryptography.Pkcs
                 DSAParameters dsaParameters = dsa.ExportParameters(false);
                 int bufSize = 2 * dsaParameters.Q.Length;
 
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                 byte[] rented = CryptoPool.Rent(bufSize);
                 Span<byte> ieee = new Span<byte>(rented, 0, bufSize);
 
@@ -83,7 +83,7 @@ namespace System.Security.Cryptography.Pkcs
                     }
 
                     return dsa.VerifySignature(valueHash, ieee);
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                 }
                 finally
                 {
@@ -93,7 +93,7 @@ namespace System.Security.Cryptography.Pkcs
             }
 
             protected override bool Sign(
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                 ReadOnlySpan<byte> dataHash,
 #else
                 byte[] dataHash,
@@ -133,7 +133,7 @@ namespace System.Security.Cryptography.Pkcs
 
                 signatureAlgorithm = new Oid(oidValue, oidValue);
 
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                 // The Q size cannot be bigger than the KeySize.
                 byte[] rented = CryptoPool.Rent(dsa.KeySize / 8);
                 int bytesWritten = 0;
index f50e76b..7ba8e50 100644 (file)
@@ -37,7 +37,7 @@ namespace System.Security.Cryptography.Pkcs
             }
 
             internal override bool VerifySignature(
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                 ReadOnlySpan<byte> valueHash,
                 ReadOnlyMemory<byte> signature,
 #else
@@ -73,7 +73,7 @@ namespace System.Security.Cryptography.Pkcs
                     bufSize = 2 * fieldSize;
                 }
 
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                 byte[] rented = CryptoPool.Rent(bufSize);
                 Span<byte> ieee = new Span<byte>(rented, 0, bufSize);
 
@@ -88,7 +88,7 @@ namespace System.Security.Cryptography.Pkcs
                     }
 
                     return key.VerifyHash(valueHash, ieee);
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                 }
                 finally
                 {
@@ -98,7 +98,7 @@ namespace System.Security.Cryptography.Pkcs
             }
 
             protected override bool Sign(
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                 ReadOnlySpan<byte> dataHash,
 #else
                 byte[] dataHash,
@@ -138,7 +138,7 @@ namespace System.Security.Cryptography.Pkcs
 
                 signatureAlgorithm = new Oid(oidValue, oidValue);
 
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                 int bufSize;
                 checked
                 {
@@ -174,7 +174,7 @@ namespace System.Security.Cryptography.Pkcs
 #endif
 
                 signatureValue = DsaIeeeToDer(key.SignHash(
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                     dataHash.ToArray()
 #else
                     dataHash
index 3f931d0..59cf00c 100644 (file)
@@ -40,7 +40,7 @@ namespace System.Security.Cryptography.Pkcs
             }
 
             internal override bool VerifySignature(
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                 ReadOnlySpan<byte> valueHash,
                 ReadOnlyMemory<byte> signature,
 #else
@@ -76,7 +76,7 @@ namespace System.Security.Cryptography.Pkcs
 
                 return publicKey.VerifyHash(
                     valueHash,
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                     signature.Span,
 #else
                     signature,
@@ -123,7 +123,7 @@ namespace System.Security.Cryptography.Pkcs
             }
 
             protected override bool Sign(
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                 ReadOnlySpan<byte> dataHash,
 #else
                 byte[] dataHash,
@@ -151,7 +151,7 @@ namespace System.Security.Cryptography.Pkcs
 
                 signatureAlgorithm = new Oid(Oids.Rsa, Oids.Rsa);
 
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                 byte[] signature = new byte[privateKey.KeySize / 8];
 
                 bool signed = privateKey.TrySignHash(
@@ -176,7 +176,7 @@ namespace System.Security.Cryptography.Pkcs
                 }
 #endif
                 signatureValue = privateKey.SignHash(
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                     dataHash.ToArray(),
 #else
                     dataHash,
@@ -267,7 +267,7 @@ namespace System.Security.Cryptography.Pkcs
             }
 
             protected override bool Sign(
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                 ReadOnlySpan<byte> dataHash,
 #else
                 byte[] dataHash,
index ec8ba00..4bec2a4 100644 (file)
@@ -29,7 +29,7 @@ namespace System.Security.Cryptography.Pkcs
         protected abstract bool VerifyKeyType(AsymmetricAlgorithm key);
 
         internal abstract bool VerifySignature(
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
             ReadOnlySpan<byte> valueHash,
             ReadOnlyMemory<byte> signature,
 #else
@@ -42,7 +42,7 @@ namespace System.Security.Cryptography.Pkcs
             X509Certificate2 certificate);
 
         protected abstract bool Sign(
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
             ReadOnlySpan<byte> dataHash,
 #else
             byte[] dataHash,
@@ -70,7 +70,7 @@ namespace System.Security.Cryptography.Pkcs
         }
 
         internal static bool Sign(
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
             ReadOnlySpan<byte> dataHash,
 #else
             byte[] dataHash,
@@ -167,7 +167,7 @@ namespace System.Security.Cryptography.Pkcs
             {
                 writer.PushSequence();
 
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                 // r
                 BigInteger val = new BigInteger(
                     ieeeSignature.Slice(0, fieldSize),
index f44b167..18f1ca9 100644 (file)
@@ -51,7 +51,7 @@ namespace System.Security.Cryptography.Pkcs
         {
         }
 
-        // This can be implemented with netcoreapp20 with the cert creation API.
+        // This can be implemented with NETCOREAPP2_0 with the cert creation API.
         // * Open the parameters as RSACSP (RSA PKCS#1 signature was hard-coded in netfx)
         //   * Which will fail on non-Windows
         // * Create a certificate with subject CN=CMS Signer Dummy Certificate
index b964275..e304950 100644 (file)
@@ -662,7 +662,7 @@ namespace System.Security.Cryptography.Pkcs
                     {
                         writer.PopSequence();
 
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                         Span<byte> setOfTag = stackalloc byte[1];
                         setOfTag[0] = 0x31;
 
@@ -678,7 +678,7 @@ namespace System.Security.Cryptography.Pkcs
                     {
                         writer.PopSetOf();
 
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                         hasher.AppendData(writer.EncodeAsSpan());
 #else
                         hasher.AppendData(writer.Encode());
@@ -771,7 +771,7 @@ namespace System.Security.Cryptography.Pkcs
                     return false;
                 }
 
-#if netcoreapp || netcoreapp30 || netstandard21
+#if NETCOREAPP || NETSTANDARD2_1
                 // SHA-2-512 is the biggest digest type we know about.
                 Span<byte> digestValue = stackalloc byte[512 / 8];
                 ReadOnlySpan<byte> digest = digestValue;
index 2bd11c4..4e7ee39 100644 (file)
@@ -16,7 +16,7 @@ namespace Test.Cryptography
         // Prefer ephemeral when available
         private static X509KeyStorageFlags GetBestKeyStorageFlags()
         {
-#if netcoreapp
+#if NETCOREAPP
             if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
             {
                 // On Windows 7 ephemeral keys with a key usage embedded in the PFX
@@ -178,7 +178,7 @@ namespace Test.Cryptography
 
         internal override CertLoader CloneAsEphemeralLoader()
         {
-#if netcoreapp
+#if NETCOREAPP
             return new CertLoaderFromRawData(CerData, PfxData, Password)
             {
                 KeyStorageFlags = X509KeyStorageFlags.EphemeralKeySet,
index 978bd0d..30b505f 100644 (file)
@@ -836,7 +836,7 @@ namespace System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests
                 if (cert == null)
                     return; // Sorry - CertLoader is not configured to load certs with private keys - we've tested as much as we can.
 
-#if netcoreapp // API not present on netfx
+#if NETCOREAPP // API not present on netfx
                 if (_useExplicitPrivateKey)
                 {
                     using (X509Certificate2 pubCert = certLoader.GetCertificate())
index 2f66194..c578ab6 100644 (file)
@@ -275,7 +275,7 @@ namespace System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests
         [Theory]
         [OuterLoop(/* Leaks key on disk if interrupted */)]
         [InlineData(false)]
-#if netcoreapp // API not supported on netfx
+#if NETCOREAPP // API not supported on netfx
         [InlineData(true)]
 #endif
         public static void PostDecrypt_Encode(bool useExplicitPrivateKey)
@@ -301,7 +301,7 @@ namespace System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests
 
                 if (useExplicitPrivateKey)
                 {
-#if netcoreapp
+#if NETCOREAPP
                     ecms.Decrypt(r[0], cer.GetRSAPrivateKey());
 #else
                     Assert.True(false, "Should not run on this platform");
@@ -363,7 +363,7 @@ namespace System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests
         [Theory]
         [OuterLoop(/* Leaks key on disk if interrupted */)]
         [InlineData(false)]
-#if netcoreapp // API not supported on netfx
+#if NETCOREAPP // API not supported on netfx
         [InlineData(true)]
 #endif
         public static void PostDecrypt_Decrypt(bool useExplicitPrivateKey)
@@ -405,7 +405,7 @@ namespace System.Security.Cryptography.Pkcs.EnvelopedCmsTests.Tests
                 {
                     if (useExplicitPrivateKey)
                     {
-#if netcoreapp
+#if NETCOREAPP
                         ecms.Decrypt(r[0], cert1.GetRSAPrivateKey());
 #else
                         Assert.True(false, "Should not run on this platform");
index ed86ff0..d261a61 100644 (file)
@@ -563,7 +563,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             Assert.NotSame(cms.Certificates[0], firstSigner.Certificate);
             Assert.Equal(cms.Certificates[0], firstSigner.Certificate);
 
-#if netcoreapp
+#if NETCOREAPP
             byte[] signature = firstSigner.GetSignature();
             Assert.NotEmpty(signature);
             // DSA PKIX signature format is a DER SEQUENCE.
@@ -582,7 +582,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             Assert.Equal(identifierType, cms.SignerInfos[0].SignerIdentifier.Type);
             Assert.Equal(firstSigner.Certificate, cms.SignerInfos[0].Certificate);
 
-#if netcoreapp
+#if NETCOREAPP
             byte[] sig2 = cms.SignerInfos[0].GetSignature();
             Assert.Equal(signature, sig2);
 #endif
@@ -634,7 +634,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             Assert.NotSame(cms.Certificates[0], firstSigner.Certificate);
             Assert.Equal(cms.Certificates[0], firstSigner.Certificate);
 
-#if netcoreapp
+#if NETCOREAPP
             byte[] signature = firstSigner.GetSignature();
             Assert.NotEmpty(signature);
             // ECDSA PKIX signature format is a DER SEQUENCE.
@@ -656,7 +656,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             Assert.Equal(identifierType, cms.SignerInfos[0].SignerIdentifier.Type);
             Assert.Equal(firstSigner.Certificate, cms.SignerInfos[0].Certificate);
 
-#if netcoreapp
+#if NETCOREAPP
             byte[] sig2 = cms.SignerInfos[0].GetSignature();
             Assert.Equal(signature, sig2);
 #endif
@@ -952,7 +952,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             Assert.Equal(2, cms.SignerInfos.Count);
 
             // One of them is a V3 signer, so the whole document is V3.
-#if netfx
+#if NETFRAMEWORK
             // Windows CMS computes the version on the first signer, and doesn't
             // seem to lift it on the second one.
             // It encoded the message as
@@ -963,7 +963,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             {
 #endif
             Assert.Equal(3, cms.Version);
-#if netfx
+#if NETFRAMEWORK
             }
 #endif
 
@@ -1058,7 +1058,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
                 cms.ComputeSignature(signer);
 
                 bool ExpectCopyRemoved =
-#if !netfx
+#if !NETFRAMEWORK
                     true
 #else
                     false
index 1278e65..613c417 100644 (file)
@@ -45,7 +45,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             Assert.Equal(SubjectIdentifierType.SubjectKeyIdentifier, signer.SignerIdentifier.Type);
             Assert.Equal("1063CAB14FB14C47DC211C0E0285F3EE5946BF2D", signer.SignerIdentifier.Value);
             Assert.Equal("2.16.840.1.101.3.4.2.1", signer.DigestAlgorithm.Value);
-#if netcoreapp
+#if NETCOREAPP
             Assert.Equal("1.2.840.113549.1.1.10", signer.SignatureAlgorithm.Value);
 #endif
 
@@ -84,7 +84,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
                     "082A864886F70D0302020128",
                 signedAttrs[3].Values[0].RawData.ByteArrayToHex());
 
-#if netcoreapp
+#if NETCOREAPP
             Assert.Equal(
                 "B93E81D141B3C9F159AB0021910635DC72E8E860BE43C28E5D53243D6DC247B7" +
                     "D4F18C20195E80DEDCC75B29C43CE5047AD775B65BFC93589BD748B950C68BAD" +
@@ -153,7 +153,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             Assert.Equal(SubjectIdentifierType.IssuerAndSerialNumber, signer.SignerIdentifier.Type);
             Assert.Equal(Oids.Sha1, signer.DigestAlgorithm.Value);
 
-#if netcoreapp
+#if NETCOREAPP
             Assert.Equal(Oids.Rsa, signer.SignatureAlgorithm.Value);
 
             Assert.Equal(
@@ -220,7 +220,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             Assert.Equal(SubjectIdentifierType.IssuerAndSerialNumber, signer.SignerIdentifier.Type);
             Assert.Equal(Oids.Sha1, signer.DigestAlgorithm.Value);
 
-#if netcoreapp
+#if NETCOREAPP
             Assert.Equal(Oids.Rsa, signer.SignatureAlgorithm.Value);
 
             Assert.Equal(
@@ -294,7 +294,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             Assert.Null(signer.Certificate);
             Assert.Equal(Oids.Sha1, signer.DigestAlgorithm.Value);
 
-#if netcoreapp
+#if NETCOREAPP
             Assert.Equal("1.3.6.1.5.5.7.6.2", signer.SignatureAlgorithm.Value);
 
             Assert.Equal(
@@ -353,7 +353,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
                 "833378066BDCCBA7047EF6919843D181A57D6479",
                 csMessageDigest.MessageDigest.ByteArrayToHex());
 
-#if netcoreapp
+#if NETCOREAPP
             Assert.Equal(Oids.Rsa, counterSigner.SignatureAlgorithm.Value);
 
             Assert.Equal(
@@ -430,7 +430,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             Assert.Empty(signer.CounterSignerInfos);
             Assert.Null(signer.Certificate);
 
-#if netcoreapp
+#if NETCOREAPP
             Assert.Equal(Oids.Rsa, signer.SignatureAlgorithm.Value);
 
             Assert.Equal(
@@ -534,7 +534,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             Assert.Equal(SubjectIdentifierType.IssuerAndSerialNumber, signer.SignerIdentifier.Type);
             Assert.Equal(Oids.Sha1, signer.DigestAlgorithm.Value);
 
-#if netcoreapp
+#if NETCOREAPP
             Assert.Equal(Oids.Rsa, signer.SignatureAlgorithm.Value);
 
             Assert.Equal(
@@ -580,7 +580,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             // Assert.NotThrows
             cms.CheckSignature(true);
 
-#if netcoreapp
+#if NETCOREAPP
             Assert.Equal(
                 "1AA282DBED4D862D7CEA30F803E790BDB0C97EE852778CEEDDCD94BB9304A155" +
                     "2E60A8D36052AC8C2D28755F3B2F473824100AB3A6ABD4C15ABD77E0FFE13D0D" +
index 422469c..33b9e7a 100644 (file)
@@ -101,7 +101,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
                 Assert.NotSame(counterSigner.Certificate, counterSigner2.Certificate);
                 Assert.Equal(counterSigner.Certificate, counterSigner2.Certificate);
 
-#if netcoreapp
+#if NETCOREAPP
                 byte[] signature = counterSigner.GetSignature();
                 byte[] signature2 = counterSigner2.GetSignature();
 
@@ -111,7 +111,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             }
         }
 
-#if netcoreapp
+#if NETCOREAPP
         [Fact]
         public static void SignerInfo_GetSignature_UniquePerCall()
         {
@@ -140,7 +140,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             Assert.NotSame(oid, oid2);
         }
 
-#if netcoreapp
+#if NETCOREAPP
         [Fact]
         public static void SignerInfo_SignatureAlgorithm_NotSame()
         {
@@ -599,7 +599,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             // content-type attribute even for counter-signers.
             int expectedAttrCount = 1;
             // One of them is a V3 signer.
-#if netfx
+#if NETFRAMEWORK
             expectedAttrCount = 2;
 #endif
             Assert.Equal(expectedAttrCount, counterSigner.SignedAttributes.Count);
@@ -646,7 +646,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             // On NetFx there will be two attributes, because Windows emits the
             // content-type attribute even for counter-signers.
             int expectedCount = 1;
-#if netfx
+#if NETFRAMEWORK
             expectedCount = 2;
 #endif
             Assert.Equal(expectedCount, counterSigner.SignedAttributes.Count);
@@ -736,7 +736,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             // On NetFx there will be two attributes, because Windows emits the
             // content-type attribute even for counter-signers.
             int expectedCount = 1;
-#if netfx
+#if NETFRAMEWORK
             expectedCount = 2;
 #endif
             Assert.Equal(expectedCount, counterSigner.SignedAttributes.Count);
@@ -745,7 +745,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             Assert.NotEqual(firstSigner2.Certificate, counterSigner.Certificate);
             Assert.Equal(2, cms.Certificates.Count);
 
-#if netcoreapp
+#if NETCOREAPP
             byte[] signature = counterSigner.GetSignature();
             Assert.NotEmpty(signature);
             // DSA PKIX signature format is a DER SEQUENCE.
@@ -804,7 +804,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             // On NetFx there will be two attributes, because Windows emits the
             // content-type attribute even for counter-signers.
             int expectedCount = 1;
-#if netfx
+#if NETFRAMEWORK
             expectedCount = 2;
 #endif
             Assert.Equal(expectedCount, counterSigner.SignedAttributes.Count);
@@ -813,7 +813,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
             Assert.NotEqual(firstSigner2.Certificate, counterSigner.Certificate);
             Assert.Equal(2, cms.Certificates.Count);
 
-#if netcoreapp
+#if NETCOREAPP
             byte[] signature = counterSigner.GetSignature();
             Assert.NotEmpty(signature);
             // DSA PKIX signature format is a DER SEQUENCE.
@@ -1048,7 +1048,7 @@ namespace System.Security.Cryptography.Pkcs.Tests
                 cms.SignerInfos[0].ComputeCounterSignature(signer);
 
                 bool ExpectCopyRemoved =
-#if netfx
+#if NETFRAMEWORK
                     false
 #else
                     true
index fa7b015..2936091 100644 (file)
@@ -52,7 +52,7 @@ namespace System.Security.Cryptography.Encryption.Tests.Asymmetric
             }
         }
 
-#if netcoreapp
+#if NETCOREAPP
         [Fact]
         public static void ClearCallsDispose()
         {
index ccb961c..4a1df4c 100644 (file)
@@ -218,7 +218,7 @@ namespace System.Security.Cryptography.Encryption.Tests.Asymmetric
                 Assert.False(output.CanRead);
             }
 
-#if netcoreapp
+#if NETCOREAPP
             using (MemoryStream output = new MemoryStream())
             {
                 using (CryptoStream encryptStream = new CryptoStream(output, encryptor, CryptoStreamMode.Write, leaveOpen: false))
index 9b116db..61aa19e 100644 (file)
@@ -528,7 +528,7 @@ namespace System.Security.Cryptography.X509Certificates.Tests.CertificateCreatio
             Exception exception = Assert.Throws<CryptographicException>(
                 () =>
                 request.Create(request.SubjectName, generator, now, now.AddDays(1), new byte[1]));
-#if netcoreapp
+#if NETCOREAPP
             if (CultureInfo.CurrentCulture.Name == "en-US")
             {
                 Assert.Contains("ASN1", exception.Message, StringComparison.OrdinalIgnoreCase);
index 4cc89c3..870f920 100644 (file)
@@ -2,7 +2,7 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
-#if netcoreapp || uap
+#if NETCOREAPP || uap
 #define HAVE_STORE_ISOPEN
 #endif
 
index a37c450..f99a075 100644 (file)
@@ -13,7 +13,7 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Permissions.SecurityAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Permissions.SecurityPermissionAttribute))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Permissions.SecurityPermissionFlag))]
-#if netcoreapp || uap || netcoreapp30
+#if NETCOREAPP || uap
 [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.IStackWalk))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.PermissionSet))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Permissions.PermissionState))]
index ba990df..3a40676 100644 (file)
@@ -567,7 +567,7 @@ namespace System.Security
         void FromXml(System.Security.SecurityElement e, System.Security.Policy.PolicyLevel level);
         System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level);
     }
-#if !netcoreapp && !netcoreapp30 && !uap
+#if !NETCOREAPP && !uap
     public partial interface IStackWalk
     {
         void Assert();
@@ -591,7 +591,7 @@ namespace System.Security
         public override int GetHashCode() { throw null; }
         public override System.Security.SecurityElement ToXml() { throw null; }
     }
-#if !netcoreapp && !netcoreapp30 && !uap
+#if !NETCOREAPP && !uap
     public partial class PermissionSet : System.Collections.ICollection, System.Collections.IEnumerable, System.Runtime.Serialization.IDeserializationCallback, System.Security.ISecurityEncodable, System.Security.IStackWalk
     {
         public PermissionSet(System.Security.Permissions.PermissionState state) { }
@@ -1101,7 +1101,7 @@ namespace System.Security.Permissions
         public override System.Security.IPermission CreatePermission() { throw null; }
         public System.Security.PermissionSet CreatePermissionSet() { throw null; }
     }
-#if !netcoreapp && !netcoreapp30 && !uap
+#if !NETCOREAPP && !uap
     public enum PermissionState
     {
         None = 0,
index ad95a28..83686ed 100644 (file)
@@ -782,7 +782,7 @@ nameof(binaryForm));
                 // otherwise you would see this: "S-1-NTAuthority-32-544"
                 //
 
-#if netcoreapp20
+#if NETCOREAPP2_0
                 StringBuilder result = new StringBuilder();
                 result.Append("S-1-").Append((ulong)_identifierAuthority);
                 for (int i = 0; i < SubAuthorityCount; i++)
index cb103b7..616601e 100644 (file)
@@ -86,7 +86,7 @@ public class WellKnownSidTypeTests
         }
     }
 
-#if netcoreapp
+#if NETCOREAPP
     [ConditionalTheory(nameof(AccountIsDomainJoined))]
     [InlineData(WellKnownSidType.WinBuiltinDCOMUsersSid)]
     [InlineData(WellKnownSidType.WinBuiltinIUsersSid)]
index 8c9891a..056b1f6 100644 (file)
@@ -7,7 +7,6 @@
     <!-- For the inbox library (that is shipping with the product), this should always be true. -->
     <!-- BUILDING_INBOX_LIBRARY is only false when building the netstandard compatible NuGet package. -->
     <DefineConstants Condition="'$(TargetsNETStandard)' != 'true' AND '$(TargetsNetFx)' != 'true'">$(DefineConstants);BUILDING_INBOX_LIBRARY</DefineConstants>
-    <DefineConstants Condition="'$(TargetsNetFx)' == 'true'">$(DefineConstants);netstandard</DefineConstants>
     <!-- Workaround for overriding the XML comments related warnings that are being supressed repo wide (within arcade): -->
     <!-- https://github.com/dotnet/arcade/blob/ea6addfdc65e5df1b2c036f11614a5f922e36267/src/Microsoft.DotNet.Arcade.Sdk/tools/ProjectDefaults.props#L90 -->
     <!-- For this project, we want warnings if there are public APIs/types without properly formatted XML comments (particularly CS1591). -->
index e774adc..163383d 100644 (file)
@@ -72,7 +72,7 @@ namespace System.Text.Json
         internal static string Utf8GetString(ReadOnlySpan<byte> bytes)
         {
             return Encoding.UTF8.GetString(bytes
-#if netstandard
+#if NETSTANDARD2_0 || NETFRAMEWORK
                         .ToArray()
 #endif
                 );
@@ -83,7 +83,7 @@ namespace System.Text.Json
         /// </summary>
         internal static bool TryAdd<TKey, TValue>(Dictionary<TKey, TValue> dictionary, TKey key, TValue value)
         {
-#if netstandard
+#if NETSTANDARD2_0 || NETFRAMEWORK
             if (!dictionary.ContainsKey(key))
             {
                 dictionary[key] = value;
index 2625578..bb17b4b 100644 (file)
@@ -86,7 +86,7 @@ namespace System.Text.Json.Tests
                 expectedValue,
                 Encoding.UTF8.GetString(
                     buffer.WrittenSpan
-#if netfx
+#if NETFRAMEWORK
                         .ToArray()
 #endif
                     ));
index 87dd679..5af9d78 100644 (file)
@@ -713,7 +713,7 @@ namespace System.Text.Json
         {
             string value = Encoding.UTF8.GetString(
                     buffer.WrittenSpan
-#if netfx
+#if NETFRAMEWORK
                         .ToArray()
 #endif
                     );
@@ -735,7 +735,7 @@ namespace System.Text.Json
         {
             string value = Encoding.UTF8.GetString(
                     buffer.WrittenSpan
-#if netfx
+#if NETFRAMEWORK
                         .ToArray()
 #endif
                     );
index d10a590..f8b625f 100644 (file)
@@ -4332,7 +4332,7 @@ namespace System.Text.Json.Tests
 
                 string result = Encoding.UTF8.GetString(
                         output.WrittenSpan
-#if netfx
+#if NETFRAMEWORK
                         .ToArray()
 #endif
                     );
index 2b48886..38a87c1 100644 (file)
@@ -4,7 +4,7 @@
 
 using System.Collections;
 using Xunit;
-#if netcoreapp
+#if NETCOREAPP
 using System.Runtime.CompilerServices;
 #endif
 
@@ -773,7 +773,7 @@ namespace System.Tests
             AssertExtensions.Throws<ArgumentException>("other", () => ((IStructuralComparable)a).CompareTo("string", DummyTestComparer.Instance));
 
             Assert.Equal("(1, 2, 3, 4, 5, 6, 7, )", CreateLong(1, 2, 3, 4, 5, 6, 7, new ValueTuple()).ToString());
-#if netcoreapp
+#if NETCOREAPP
             ITuple it = ValueTuple.Create();
             Assert.Throws<IndexOutOfRangeException>(() => it[-1].ToString());
             Assert.Throws<IndexOutOfRangeException>(() => it[0].ToString());
@@ -804,7 +804,7 @@ namespace System.Tests
             Assert.Equal("()", vtWithNull.ToString());
             Assert.Equal(tupleWithNull.ToString(), vtWithNull.ToString());
 
-#if netcoreapp
+#if NETCOREAPP
             ITuple it = ValueTuple.Create(1);
             Assert.Throws<IndexOutOfRangeException>(() => it[-1].ToString());
             Assert.Equal(1, it[0]);
@@ -836,7 +836,7 @@ namespace System.Tests
             Assert.Equal("(, )", vtWithNull.ToString());
             Assert.Equal(tupleWithNull.ToString(), vtWithNull.ToString());
 
-#if netcoreapp
+#if NETCOREAPP
             ITuple it = ValueTuple.Create(1, 2);
             Assert.Throws<IndexOutOfRangeException>(() => it[-1].ToString());
             Assert.Equal(1, it[0]);
@@ -871,7 +871,7 @@ namespace System.Tests
             Assert.Equal("(, , )", vtWithNull.ToString());
             Assert.Equal(tupleWithNull.ToString(), vtWithNull.ToString());
 
-#if netcoreapp
+#if NETCOREAPP
             ITuple it = ValueTuple.Create(1, 2, 3);
             Assert.Throws<IndexOutOfRangeException>(() => it[-1].ToString());
             Assert.Equal(1, it[0]);
@@ -910,7 +910,7 @@ namespace System.Tests
             Assert.Equal("(, , , )", vtWithNull.ToString());
             Assert.Equal(tupleWithNull.ToString(), vtWithNull.ToString());
 
-#if netcoreapp
+#if NETCOREAPP
             ITuple it = ValueTuple.Create(1, 2, 3, 4);
             Assert.Throws<IndexOutOfRangeException>(() => it[-1].ToString());
             Assert.Equal(1, it[0]);
@@ -952,7 +952,7 @@ namespace System.Tests
             Assert.Equal("(, , , , )", vtWithNull.ToString());
             Assert.Equal(tupleWithNull.ToString(), vtWithNull.ToString());
 
-#if netcoreapp
+#if NETCOREAPP
             ITuple it = ValueTuple.Create(1, 2, 3, 4, 5);
             Assert.Throws<IndexOutOfRangeException>(() => it[-1].ToString());
             Assert.Equal(1, it[0]);
@@ -997,7 +997,7 @@ namespace System.Tests
             Assert.Equal("(, , , , , )", vtWithNull.ToString());
             Assert.Equal(tupleWithNull.ToString(), vtWithNull.ToString());
 
-#if netcoreapp
+#if NETCOREAPP
             ITuple it = ValueTuple.Create(1, 2, 3, 4, 5, 6);
             Assert.Throws<IndexOutOfRangeException>(() => it[-1].ToString());
             Assert.Equal(1, it[0]);
@@ -1045,7 +1045,7 @@ namespace System.Tests
             Assert.Equal("(, , , , , , )", vtWithNull.ToString());
             Assert.Equal(tupleWithNull.ToString(), vtWithNull.ToString());
 
-#if netcoreapp
+#if NETCOREAPP
             ITuple it = ValueTuple.Create(1, 2, 3, 4, 5, 6, 7);
             Assert.Throws<IndexOutOfRangeException>(() => it[-1].ToString());
             Assert.Equal(1, it[0]);
@@ -1117,7 +1117,7 @@ namespace System.Tests
             Assert.Equal("(, , , , , , , )", vtWithNull.ToString());
             Assert.Equal(tupleWithNull.ToString(), vtWithNull.ToString());
 
-#if netcoreapp
+#if NETCOREAPP
             ITuple it = CreateLong(1, 2, 3, 4, 5, 6, 7, ValueTuple.Create(8));
             Assert.Throws<IndexOutOfRangeException>(() => it[-1].ToString());
             Assert.Equal(1, it[0]);
@@ -1206,7 +1206,7 @@ namespace System.Tests
 
             Assert.Equal("(1, 2, 3, 4, 5, 6, 7, 1, 0, 0, 0, 0, 0, 0, 42)", CreateLong(1, 2, 3, 4, 5, 6, 7, d).ToString());
 
-#if netcoreapp
+#if NETCOREAPP
             ITuple it = d;
             Assert.Throws<IndexOutOfRangeException>(() => it[-1].ToString());
             Assert.Equal(1, it[0]);
index 40be9d9..a0c3b29 100644 (file)
@@ -19,7 +19,7 @@ using System.Runtime.CompilerServices;
 [assembly: TypeForwardedTo(typeof(System.IntPtr))]
 [assembly: TypeForwardedTo(typeof(System.MulticastDelegate))]
 [assembly: TypeForwardedTo(typeof(System.Object))]
-#if !NETSTANDARD10 && !NETSTANDARD12
+#if !NETSTANDARD1_0 && !NETSTANDARD1_2
 [assembly: TypeForwardedTo(typeof(System.Runtime.CompilerServices.IsConst))]
 #endif
 [assembly: TypeForwardedTo(typeof(System.Single))]
index f49888a..ad6a108 100644 (file)
@@ -7,7 +7,6 @@
          against Windows.winmd.  The real mscorlib comes from src/shims/shims.proj -->
     <BinPlaceRef>false</BinPlaceRef>
     <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard-Debug;netstandard-Release;netstandard1.0-Debug;netstandard1.0-Release;uap-Debug;uap-Release</Configurations>
-    <DefineConstants Condition="'$(TargetGroup)' == 'netstandard1.2'">$(DefineConstants);NETSTANDARD12</DefineConstants>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="TypeForwards.cs" />
index 81aaf80..c3e349f 100644 (file)
@@ -5,7 +5,7 @@
 // Add any internal types that we need to forward from System.Data.
 
 // These types are required for Desktop to Core serialization as they are not covered by GenAPI because they are not exposed in the ref assembly.
-#if netcoreapp
+#if NETCOREAPP
 // System.Data.Odbc is only supported on netcoreapp
 [assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.Odbc.ODBC32))]
 #endif
\ No newline at end of file