Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Baulig <mabaul@microsoft.com>2018-07-24 05:52:17 +0300
committerMarek Safar <marek.safar@gmail.com>2018-07-24 16:22:38 +0300
commit68e16beccdd6fb2f5b05343d6f005e9e99d4ba5b (patch)
treee922ad75a098f60018027b8046723a3ef145269f /src/System.Security.Cryptography.Encoding
parentfe3e1548a68fd9399e8b2a0bbd01f31400169253 (diff)
Partial cleanup of `Internal.Cryptography.Helpers`. (#31228)
* Partial cleanup of `Internal.Cryptography.Helpers`. At the moment, each of the `System.Security.Cryptography.*` projects defines its own `Internal.Cryptography.Helpers` and several of them contain identical helper methods such as for instance `CloneByteArray()`. This causes problems for Mono when we're trying to combine pieces from multiple of these projects into our assemblies. This is a partial cleanup, which adds a `partial` modifier to all these classes and moves the `CloneByteArray()` into a new shared file. * Add the missing file to `System.Security.Cryptography.X509Certificates`. * Make it build. * Unconditionally include the common Helpers.cs.
Diffstat (limited to 'src/System.Security.Cryptography.Encoding')
-rw-r--r--src/System.Security.Cryptography.Encoding/src/Internal/Cryptography/Helpers.cs24
-rw-r--r--src/System.Security.Cryptography.Encoding/src/System.Security.Cryptography.Encoding.csproj4
2 files changed, 3 insertions, 25 deletions
diff --git a/src/System.Security.Cryptography.Encoding/src/Internal/Cryptography/Helpers.cs b/src/System.Security.Cryptography.Encoding/src/Internal/Cryptography/Helpers.cs
deleted file mode 100644
index c23569cd28..0000000000
--- a/src/System.Security.Cryptography.Encoding/src/Internal/Cryptography/Helpers.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.Diagnostics;
-using System.Security.Cryptography;
-
-namespace Internal.Cryptography
-{
- internal static class Helpers
- {
- public static byte[] CloneByteArray(this byte[] src)
- {
- if (src == null)
- {
- return null;
- }
-
- return (byte[])(src.Clone());
- }
- }
-}
-
diff --git a/src/System.Security.Cryptography.Encoding/src/System.Security.Cryptography.Encoding.csproj b/src/System.Security.Cryptography.Encoding/src/System.Security.Cryptography.Encoding.csproj
index 388d4f36a6..7360fa7796 100644
--- a/src/System.Security.Cryptography.Encoding/src/System.Security.Cryptography.Encoding.csproj
+++ b/src/System.Security.Cryptography.Encoding/src/System.Security.Cryptography.Encoding.csproj
@@ -16,7 +16,6 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Windows_NT-Release|AnyCPU'" />
<ItemGroup>
<Compile Include="Internal\Cryptography\AsnFormatter.cs" />
- <Compile Include="Internal\Cryptography\Helpers.cs" />
<Compile Include="Internal\Cryptography\OidLookup.cs" />
<Compile Include="System\Security\Cryptography\AsnEncodedData.cs" />
<Compile Include="System\Security\Cryptography\AsnEncodedDataCollection.cs" />
@@ -26,6 +25,9 @@
<Compile Include="System\Security\Cryptography\OidCollection.cs" />
<Compile Include="System\Security\Cryptography\OidEnumerator.cs" />
<Compile Include="System\Security\Cryptography\OidGroup.cs" />
+ <Compile Include="$(CommonPath)\Internal\Cryptography\Helpers.cs">
+ <Link>Internal\Cryptography\Helpers.cs</Link>
+ </Compile>
</ItemGroup>
<ItemGroup Condition=" '$(TargetsWindows)' == 'true'">
<Compile Include="Internal\Cryptography\AsnFormatter.Windows.cs" />