From d327311b4c421cb11d9178a44c521139075262b6 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Mon, 27 Aug 2018 21:42:29 +0200 Subject: [PATCH] Remove unused configurations and merge files (dotnet/corefx#31959) Commit migrated from https://github.com/dotnet/corefx/commit/a5213923741b270126d79e2870c381a37e7f62b2 --- .../System.Net.Sockets/ref/System.Net.Sockets.cs | 20 +++++++++- .../ref/System.Net.Sockets.csproj | 1 - .../ref/System.Net.Sockets.netcoreapp.cs | 44 ---------------------- ...ntime.InteropServices.RuntimeInformation.csproj | 2 +- ...ntime.InteropServices.RuntimeInformation.csproj | 34 +++++------------ .../RuntimeInformation.Windows.cs | 15 +------- .../RuntimeInformation/RuntimeInformation.cs | 4 +- .../System.Security.Cryptography.Algorithms.csproj | 8 +--- 8 files changed, 33 insertions(+), 95 deletions(-) delete mode 100644 src/libraries/System.Net.Sockets/ref/System.Net.Sockets.netcoreapp.cs diff --git a/src/libraries/System.Net.Sockets/ref/System.Net.Sockets.cs b/src/libraries/System.Net.Sockets/ref/System.Net.Sockets.cs index 1734bce..f18ebb3 100644 --- a/src/libraries/System.Net.Sockets/ref/System.Net.Sockets.cs +++ b/src/libraries/System.Net.Sockets/ref/System.Net.Sockets.cs @@ -111,12 +111,16 @@ namespace System.Net.Sockets public override void EndWrite(IAsyncResult asyncResult) { } public override void Flush() { } public override System.Threading.Tasks.Task FlushAsync(System.Threading.CancellationToken cancellationToken) { throw null; } - public override int ReadByte() { throw null; } + public override int Read(System.Span buffer) { throw null; } + public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default) { throw null; } public override int Read(byte[] buffer, int offset, int size) { throw null; } public override System.Threading.Tasks.Task ReadAsync(byte[] buffer, int offset, int size, System.Threading.CancellationToken cancellationToken) { throw null; } + public override int ReadByte() { throw null; } public override long Seek(long offset, System.IO.SeekOrigin origin) { throw null; } public override void SetLength(long value) { } + public override void Write(System.ReadOnlySpan buffer) { } public override void Write(byte[] buffer, int offset, int size) { } + public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default) { throw null; } public override System.Threading.Tasks.Task WriteAsync(byte[] buffer, int offset, int size, System.Threading.CancellationToken cancellationToken) { throw null; } public override void WriteByte(byte value) { } } @@ -295,6 +299,9 @@ namespace System.Net.Sockets public int IOControl(System.Net.Sockets.IOControlCode ioControlCode, byte[] optionInValue, byte[] optionOutValue) { throw null; } public void Listen(int backlog) { } public bool Poll(int microSeconds, System.Net.Sockets.SelectMode mode) { throw null; } + public int Receive(Span buffer) { throw null; } + public int Receive(Span buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; } + public int Receive(Span buffer, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw null; } public int Receive(byte[] buffer) { throw null; } public int Receive(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags) { throw null; } public int Receive(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw null; } @@ -312,6 +319,9 @@ namespace System.Net.Sockets public int ReceiveMessageFrom(byte[] buffer, int offset, int size, ref System.Net.Sockets.SocketFlags socketFlags, ref System.Net.EndPoint remoteEP, out System.Net.Sockets.IPPacketInformation ipPacketInformation) { throw null; } public bool ReceiveMessageFromAsync(System.Net.Sockets.SocketAsyncEventArgs e) { throw null; } public static void Select(System.Collections.IList checkRead, System.Collections.IList checkWrite, System.Collections.IList checkError, int microSeconds) { } + public int Send(ReadOnlySpan buffer) { throw null; } + public int Send(ReadOnlySpan buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; } + public int Send(ReadOnlySpan buffer, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw null; } public int Send(byte[] buffer) { throw null; } public int Send(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags) { throw null; } public int Send(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw null; } @@ -349,12 +359,14 @@ namespace System.Net.Sockets public int Count { get { throw null; } } public bool DisconnectReuseSocket { get { throw null; } set { } } public System.Net.Sockets.SocketAsyncOperation LastOperation { get { throw null; } } + public System.Memory MemoryBuffer { get { throw null; } } public int Offset { get { throw null; } } public System.Net.Sockets.IPPacketInformation ReceiveMessageFromPacketInfo { get { throw null; } } public System.Net.EndPoint RemoteEndPoint { get { throw null; } set { } } public System.Net.Sockets.SendPacketsElement[] SendPacketsElements { get { throw null; } set { } } public System.Net.Sockets.TransmitFileOptions SendPacketsFlags { get { throw null; } set { } } public int SendPacketsSendSize { get { throw null; } set { } } + public void SetBuffer(System.Memory buffer) { throw null; } public System.Net.Sockets.SocketError SocketError { get { throw null; } set { } } public System.Net.Sockets.SocketFlags SocketFlags { get { throw null; } set { } } public object UserToken { get { throw null; } set { } } @@ -514,10 +526,12 @@ namespace System.Net.Sockets public static System.Threading.Tasks.Task ConnectAsync(this System.Net.Sockets.Socket socket, string host, int port) { throw null; } public static System.Threading.Tasks.Task ReceiveAsync(this System.Net.Sockets.Socket socket, System.ArraySegment buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; } public static System.Threading.Tasks.Task ReceiveAsync(this System.Net.Sockets.Socket socket, System.Collections.Generic.IList> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw null; } + public static System.Threading.Tasks.ValueTask ReceiveAsync(this System.Net.Sockets.Socket socket, System.Memory buffer, System.Net.Sockets.SocketFlags socketFlags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task ReceiveFromAsync(this System.Net.Sockets.Socket socket, System.ArraySegment buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint) { throw null; } public static System.Threading.Tasks.Task ReceiveMessageFromAsync(this System.Net.Sockets.Socket socket, System.ArraySegment buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint) { throw null; } public static System.Threading.Tasks.Task SendAsync(this System.Net.Sockets.Socket socket, System.ArraySegment buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; } public static System.Threading.Tasks.Task SendAsync(this System.Net.Sockets.Socket socket, System.Collections.Generic.IList> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw null; } + public static System.Threading.Tasks.ValueTask SendAsync(this System.Net.Sockets.Socket socket, System.ReadOnlyMemory buffer, System.Net.Sockets.SocketFlags socketFlags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task SendToAsync(this System.Net.Sockets.Socket socket, System.ArraySegment buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP) { throw null; } } public enum SocketType @@ -655,4 +669,8 @@ namespace System.Net.Sockets public static bool operator ==(System.Net.Sockets.UdpReceiveResult left, System.Net.Sockets.UdpReceiveResult right) { throw null; } public static bool operator !=(System.Net.Sockets.UdpReceiveResult left, System.Net.Sockets.UdpReceiveResult right) { throw null; } } + public sealed partial class UnixDomainSocketEndPoint : System.Net.EndPoint + { + public UnixDomainSocketEndPoint(string path) { } + } } diff --git a/src/libraries/System.Net.Sockets/ref/System.Net.Sockets.csproj b/src/libraries/System.Net.Sockets/ref/System.Net.Sockets.csproj index 80d7d4a..b78b052 100644 --- a/src/libraries/System.Net.Sockets/ref/System.Net.Sockets.csproj +++ b/src/libraries/System.Net.Sockets/ref/System.Net.Sockets.csproj @@ -5,7 +5,6 @@ - diff --git a/src/libraries/System.Net.Sockets/ref/System.Net.Sockets.netcoreapp.cs b/src/libraries/System.Net.Sockets/ref/System.Net.Sockets.netcoreapp.cs deleted file mode 100644 index 24df43e..0000000 --- a/src/libraries/System.Net.Sockets/ref/System.Net.Sockets.netcoreapp.cs +++ /dev/null @@ -1,44 +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. -// ------------------------------------------------------------------------------ -// Changes to this file must follow the http://aka.ms/api-review process. -// ------------------------------------------------------------------------------ - - -namespace System.Net.Sockets -{ - public partial class NetworkStream : System.IO.Stream - { - public override int Read(System.Span buffer) { throw null; } - public override System.Threading.Tasks.ValueTask ReadAsync(System.Memory buffer, System.Threading.CancellationToken cancellationToken = default) { throw null; } - public override void Write(System.ReadOnlySpan buffer) { } - public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory buffer, System.Threading.CancellationToken cancellationToken = default) { throw null; } - } - public partial class Socket : System.IDisposable - { - public int Receive(Span buffer) { throw null; } - public int Receive(Span buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; } - public int Receive(Span buffer, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw null; } - public int Send(ReadOnlySpan buffer) { throw null; } - public int Send(ReadOnlySpan buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; } - public int Send(ReadOnlySpan buffer, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw null; } - } - - public static partial class SocketTaskExtensions - { - public static System.Threading.Tasks.ValueTask ReceiveAsync(this System.Net.Sockets.Socket socket, System.Memory buffer, System.Net.Sockets.SocketFlags socketFlags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.ValueTask SendAsync(this System.Net.Sockets.Socket socket, System.ReadOnlyMemory buffer, System.Net.Sockets.SocketFlags socketFlags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - - public partial class SocketAsyncEventArgs : System.EventArgs, System.IDisposable - { - public System.Memory MemoryBuffer { get { throw null; } } - public void SetBuffer(System.Memory buffer) { throw null; } - } - - public sealed partial class UnixDomainSocketEndPoint : System.Net.EndPoint - { - public UnixDomainSocketEndPoint(string path) { } - } -} diff --git a/src/libraries/System.Runtime.InteropServices.RuntimeInformation/ref/System.Runtime.InteropServices.RuntimeInformation.csproj b/src/libraries/System.Runtime.InteropServices.RuntimeInformation/ref/System.Runtime.InteropServices.RuntimeInformation.csproj index 901ce9e..13d8f00 100644 --- a/src/libraries/System.Runtime.InteropServices.RuntimeInformation/ref/System.Runtime.InteropServices.RuntimeInformation.csproj +++ b/src/libraries/System.Runtime.InteropServices.RuntimeInformation/ref/System.Runtime.InteropServices.RuntimeInformation.csproj @@ -6,7 +6,7 @@ - + \ No newline at end of file diff --git a/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System.Runtime.InteropServices.RuntimeInformation.csproj b/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System.Runtime.InteropServices.RuntimeInformation.csproj index fb2f3b9..240a053 100644 --- a/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System.Runtime.InteropServices.RuntimeInformation.csproj +++ b/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System.Runtime.InteropServices.RuntimeInformation.csproj @@ -1,26 +1,18 @@ - Library System.Runtime.InteropServices - System.Runtime.InteropServices.RuntimeInformation {1CBC030D-B5D3-4AB5-A9FD-24EC5F6F38D2} - $(DefineConstants);wpa81 - $(DefineConstants);win8 $(DefineConstants);uap $(DefineConstants);uapaot - $(DefineConstants);netstandard11 - SR.PlatformNotSupported_RuntimeInformation - - $(RefRootPath)/netstandard1.1 - - $(RefRootPath)/netstandard1.1 - - - - $(MSBuildThisFileDirectory)PInvokeAnalyzer_win8-wpa81-APIs.txt netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release;uapaot-Windows_NT-Debug;uapaot-Windows_NT-Release - + + + + + + + Common\Interop\Unix\System.Native\Interop.GetUnixName.cs @@ -39,9 +31,8 @@ Common\Interop\Unix\Interop.Libraries.cs - - + Common\Interop\Windows\NtDll\Interop.RtlGetVersion.cs @@ -49,7 +40,7 @@ Common\Interop\Windows\NtDll\Interop.RTL_OSVERSIONINFOEX.cs - + Common\Interop\Windows\Interop.Libraries.cs @@ -60,8 +51,6 @@ Common\Interop\Windows\kernel32\Interop.SYSTEM_INFO.cs - - Common\Interop\Windows\kernel32\Interop.GetSystemInfo.cs @@ -75,9 +64,4 @@ - - - - - \ No newline at end of file diff --git a/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/RuntimeInformation.Windows.cs b/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/RuntimeInformation.Windows.cs index 0f894d2..8ca7908 100644 --- a/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/RuntimeInformation.Windows.cs +++ b/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/RuntimeInformation.Windows.cs @@ -25,10 +25,8 @@ namespace System.Runtime.InteropServices { if (null == s_osDescription) { -#if uap || win8 || netstandard11 || uapaot // all these are subject to WACK +#if uap || uapaot // all these are subject to WACK s_osDescription = "Microsoft Windows"; -#elif wpa81 - s_osDescription = "Microsoft Windows Phone"; #else s_osDescription = Interop.NtDll.RtlGetVersion(); #endif @@ -82,12 +80,7 @@ namespace System.Runtime.InteropServices if (null == s_processArch) { Interop.Kernel32.SYSTEM_INFO sysInfo; -#if win8 || wpa81 - // GetSystemInfo is not avaialable - Interop.Kernel32.GetNativeSystemInfo(out sysInfo); -#else Interop.Kernel32.GetSystemInfo(out sysInfo); -#endif switch((Interop.Kernel32.ProcessorArchitecture)sysInfo.wProcessorArchitecture) { @@ -99,12 +92,6 @@ namespace System.Runtime.InteropServices break; case Interop.Kernel32.ProcessorArchitecture.Processor_Architecture_AMD64: s_processArch = Architecture.X64; -#if win8 || wpa81 - if (IntPtr.Size == 4) - { - s_processArch = Architecture.X86; - } -#endif break; case Interop.Kernel32.ProcessorArchitecture.Processor_Architecture_INTEL: s_processArch = Architecture.X86; diff --git a/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/RuntimeInformation.cs b/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/RuntimeInformation.cs index bda3eb6..6485879 100644 --- a/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/RuntimeInformation.cs +++ b/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System/Runtime/InteropServices/RuntimeInformation/RuntimeInformation.cs @@ -11,9 +11,7 @@ namespace System.Runtime.InteropServices { #if uapaot private const string FrameworkName = ".NET Native"; -#elif win8 - private const string FrameworkName = ".NET Framework"; -#else // uap || wpa81 || other +#else // uap || netcoreapp private const string FrameworkName = ".NET Core"; #endif diff --git a/src/libraries/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj b/src/libraries/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj index 0df62cc..4d13c86 100644 --- a/src/libraries/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj +++ b/src/libraries/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj @@ -1,17 +1,13 @@ {81A05E2E-E3AE-4246-B4E6-DD5F31FB71F9} - Library - System.Security.Cryptography.Algorithms true $(DefineConstants);INTERNAL_ASYMMETRIC_IMPLEMENTATIONS CS3016;CA5351;$(NoWarn) $(DefineConstants);uap + $(DefineConstants);netcoreapp netcoreapp-OSX-Debug;netcoreapp-OSX-Release;netcoreapp-Unix-Debug;netcoreapp-Unix-Release;netcoreapp-Windows_NT-Debug;netcoreapp-Windows_NT-Release;uap-Windows_NT-Debug;uap-Windows_NT-Release - - $(DefineConstants);netcoreapp - @@ -186,7 +182,7 @@ Common\System\Security\Cryptography\Asn1\SubjectPublicKeyInfoAsn.cs - + -- 2.7.4