Просмотр исходного кода

[bcl] Move a few types from the Facades into the framework for netstandard20 compatibility

See https://github.com/dotnet/standard/pull/76.

Also moved IncrementalHash from System.Core.dll to mscorlib.dll as per discussion with Wes.
Alexander Köplinger 9 лет назад
Родитель
Сommit
adcc481705

+ 0 - 1
mcs/class/Facades/System.Diagnostics.Tracing/System.Diagnostics.Tracing.dll.sources

@@ -1,3 +1,2 @@
 TypeForwarders.cs
 AssemblyInfo.cs
-EventCounter.cs

+ 4 - 0
mcs/class/Facades/System.Diagnostics.Tracing/TypeForwarders.cs

@@ -44,3 +44,7 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventTask))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventWrittenEventArgs))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.NonEventAttribute))]
+
+#if NETSTANDARD
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Diagnostics.Tracing.EventCounter))]
+#endif

+ 0 - 3
mcs/class/Facades/System.Net.Sockets/System.Net.Sockets.dll.sources

@@ -1,5 +1,2 @@
 TypeForwarders.cs
 AssemblyInfo.cs
-SocketReceiveFromResult.cs
-SocketReceiveMessageFromResult.cs
-SocketTaskExtensions.cs

+ 5 - 1
mcs/class/Facades/System.Net.Sockets/TypeForwarders.cs

@@ -46,4 +46,8 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.UdpClient))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.UdpReceiveResult))]
 
-
+#if NETSTANDARD
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SocketReceiveFromResult))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SocketReceiveMessageFromResult))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Net.Sockets.SocketTaskExtensions))]
+#endif

+ 0 - 1
mcs/class/System.Core/common_System.Core.dll.sources

@@ -232,4 +232,3 @@ ReferenceSources/Strings.cs
 System.Security.Cryptography/ECCurve.cs
 System.Security.Cryptography/ECPoint.cs
 System.Security.Cryptography/ECParameters.cs
-System.Security.Cryptography/IncrementalHash.cs

+ 5 - 1
mcs/class/Facades/System.Net.Sockets/SocketReceiveFromResult.cs → mcs/class/System/System.Net.Sockets/SocketReceiveFromResult.cs

@@ -26,6 +26,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if NETSTANDARD
+
 namespace System.Net.Sockets
 {
 	public struct SocketReceiveFromResult
@@ -33,4 +35,6 @@ namespace System.Net.Sockets
 		public int ReceivedBytes;
 		public EndPoint RemoteEndPoint;
 	}
-}
+}
+
+#endif

+ 5 - 1
mcs/class/Facades/System.Net.Sockets/SocketReceiveMessageFromResult.cs → mcs/class/System/System.Net.Sockets/SocketReceiveMessageFromResult.cs

@@ -26,6 +26,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if NETSTANDARD
+
 namespace System.Net.Sockets
 {
 	public struct SocketReceiveMessageFromResult
@@ -35,4 +37,6 @@ namespace System.Net.Sockets
 		public EndPoint RemoteEndPoint;
 		public IPPacketInformation PacketInformation;
 	}
-}
+}
+
+#endif

+ 5 - 1
mcs/class/Facades/System.Net.Sockets/SocketTaskExtensions.cs → mcs/class/System/System.Net.Sockets/SocketTaskExtensions.cs

@@ -2,6 +2,8 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
+#if NETSTANDARD
+
 using System.Collections.Generic;
 using System.Threading.Tasks;
 
@@ -247,4 +249,6 @@ namespace System.Net.Sockets
                 state: socket);
         }
     }
-}
+}
+
+#endif

+ 3 - 0
mcs/class/System/System.dll.sources

@@ -380,6 +380,9 @@ System.Net.Sockets/Socket.cs
 System.Net.Sockets/SocketAsyncEventArgs.cs
 System.Net.Sockets/SocketAsyncResult.cs
 System.Net.Sockets/SocketOperation.cs
+System.Net.Sockets/SocketReceiveFromResult.cs
+System.Net.Sockets/SocketReceiveMessageFromResult.cs
+System.Net.Sockets/SocketTaskExtensions.cs
 System.Net/WebAsyncResult.cs
 System.Net/WebConnection.cs
 System.Net/WebConnectionData.cs

+ 3 - 0
mcs/class/System/mobile_System.dll.sources

@@ -123,6 +123,9 @@ System.Net.Sockets/Socket.cs
 System.Net.Sockets/SocketAsyncEventArgs.cs
 System.Net.Sockets/SocketAsyncResult.cs
 System.Net.Sockets/SocketOperation.cs
+System.Net.Sockets/SocketReceiveFromResult.cs
+System.Net.Sockets/SocketReceiveMessageFromResult.cs
+System.Net.Sockets/SocketTaskExtensions.cs
 System.Net/AuthenticationManager.cs
 System.Net/BasicClient.cs
 System.Net/BindIPEndPoint.cs

+ 5 - 1
mcs/class/Facades/System.Diagnostics.Tracing/EventCounter.cs → mcs/class/corlib/System.Diagnostics.Tracing/EventCounter.cs

@@ -26,6 +26,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if NETSTANDARD
+
 namespace System.Diagnostics.Tracing
 {
 	public class EventCounter
@@ -38,4 +40,6 @@ namespace System.Diagnostics.Tracing
 		{
 		}
 	}
-}
+}
+
+#endif

+ 1 - 1
mcs/class/System.Core/System.Security.Cryptography/IncrementalHash.cs → mcs/class/corlib/System.Security.Cryptography/IncrementalHash.cs

@@ -32,7 +32,7 @@ namespace System.Security.Cryptography
 {
     public sealed class IncrementalHash : IDisposable
     {
-        private IncrementalHash () { }
+        public IncrementalHash () { }
         public HashAlgorithmName AlgorithmName { get { throw new NotImplementedException (); } }
         public void AppendData (byte[] data) { }
         public void AppendData (byte[] data, int offset, int count) { }

+ 2 - 0
mcs/class/corlib/corlib.dll.sources

@@ -164,6 +164,7 @@ System.Diagnostics/StackFrame.cs
 System.Diagnostics/StackTrace.cs
 System.Diagnostics.Tracing/EventAttribute.cs
 System.Diagnostics.Tracing/EventCommand.cs
+System.Diagnostics.Tracing/EventCounter.cs
 System.Diagnostics.Tracing/EventSource.cs
 System.Diagnostics.Tracing/EventSourceAttribute.cs
 System.Diagnostics.Tracing/EventSourceSettings.cs
@@ -704,6 +705,7 @@ System.Security.Cryptography/CspKeyContainerInfo.cs
 System.Security.Cryptography/DESCryptoServiceProvider.cs
 System.Security.Cryptography/DSACryptoServiceProvider.cs
 System.Security.Cryptography/ICspAsymmetricAlgorithm.cs
+System.Security.Cryptography/IncrementalHash.cs
 System.Security.Cryptography/KeyNumber.cs
 System.Security.Cryptography/MD5CryptoServiceProvider.cs
 System.Security.Cryptography/RC2CryptoServiceProvider.cs