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<byte> buffer) { throw null; }
+ public override System.Threading.Tasks.ValueTask<int> ReadAsync(System.Memory<byte> 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<int> 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<byte> buffer) { }
public override void Write(byte[] buffer, int offset, int size) { }
+ public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory<byte> 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) { }
}
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<byte> buffer) { throw null; }
+ public int Receive(Span<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
+ public int Receive(Span<byte> 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; }
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<byte> buffer) { throw null; }
+ public int Send(ReadOnlySpan<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
+ public int Send(ReadOnlySpan<byte> 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; }
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<byte> 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<byte> 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 { } }
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<int> ReceiveAsync(this System.Net.Sockets.Socket socket, System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public static System.Threading.Tasks.Task<int> ReceiveAsync(this System.Net.Sockets.Socket socket, System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
+ public static System.Threading.Tasks.ValueTask<int> ReceiveAsync(this System.Net.Sockets.Socket socket, System.Memory<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public static System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveFromResult> ReceiveFromAsync(this System.Net.Sockets.Socket socket, System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint) { throw null; }
public static System.Threading.Tasks.Task<System.Net.Sockets.SocketReceiveMessageFromResult> ReceiveMessageFromAsync(this System.Net.Sockets.Socket socket, System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEndPoint) { throw null; }
public static System.Threading.Tasks.Task<int> SendAsync(this System.Net.Sockets.Socket socket, System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
public static System.Threading.Tasks.Task<int> SendAsync(this System.Net.Sockets.Socket socket, System.Collections.Generic.IList<System.ArraySegment<byte>> buffers, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
+ public static System.Threading.Tasks.ValueTask<int> SendAsync(this System.Net.Sockets.Socket socket, System.ReadOnlyMemory<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public static System.Threading.Tasks.Task<int> SendToAsync(this System.Net.Sockets.Socket socket, System.ArraySegment<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP) { throw null; }
}
public enum SocketType
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) { }
+ }
}
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Net.Sockets.cs" />
- <Compile Include="System.Net.Sockets.netcoreapp.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\System.IO\ref\System.IO.csproj" />
+++ /dev/null
-// 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<byte> buffer) { throw null; }
- public override System.Threading.Tasks.ValueTask<int> ReadAsync(System.Memory<byte> buffer, System.Threading.CancellationToken cancellationToken = default) { throw null; }
- public override void Write(System.ReadOnlySpan<byte> buffer) { }
- public override System.Threading.Tasks.ValueTask WriteAsync(System.ReadOnlyMemory<byte> buffer, System.Threading.CancellationToken cancellationToken = default) { throw null; }
- }
- public partial class Socket : System.IDisposable
- {
- public int Receive(Span<byte> buffer) { throw null; }
- public int Receive(Span<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
- public int Receive(Span<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, out System.Net.Sockets.SocketError errorCode) { throw null; }
- public int Send(ReadOnlySpan<byte> buffer) { throw null; }
- public int Send(ReadOnlySpan<byte> buffer, System.Net.Sockets.SocketFlags socketFlags) { throw null; }
- public int Send(ReadOnlySpan<byte> 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<int> ReceiveAsync(this System.Net.Sockets.Socket socket, System.Memory<byte> buffer, System.Net.Sockets.SocketFlags socketFlags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
- public static System.Threading.Tasks.ValueTask<int> SendAsync(this System.Net.Sockets.Socket socket, System.ReadOnlyMemory<byte> 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<byte> MemoryBuffer { get { throw null; } }
- public void SetBuffer(System.Memory<byte> buffer) { throw null; }
- }
-
- public sealed partial class UnixDomainSocketEndPoint : System.Net.EndPoint
- {
- public UnixDomainSocketEndPoint(string path) { }
- }
-}
<ItemGroup>
<Compile Include="System.Runtime.InteropServices.RuntimeInformation.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' Or '$(TargetGroup)' == 'uap'">
+ <ItemGroup>
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
</ItemGroup>
</Project>
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <OutputType>Library</OutputType>
<RootNamespace>System.Runtime.InteropServices</RootNamespace>
- <AssemblyName>System.Runtime.InteropServices.RuntimeInformation</AssemblyName>
<ProjectGuid>{1CBC030D-B5D3-4AB5-A9FD-24EC5F6F38D2}</ProjectGuid>
- <DefineConstants Condition="'$(TargetGroup)'=='wpa81'">$(DefineConstants);wpa81</DefineConstants>
- <DefineConstants Condition="'$(TargetGroup)'=='win8'">$(DefineConstants);win8</DefineConstants>
<DefineConstants Condition="'$(TargetGroup)'=='uap'">$(DefineConstants);uap</DefineConstants>
<DefineConstants Condition="'$(TargetGroup)'=='uapaot'">$(DefineConstants);uapaot</DefineConstants>
- <DefineConstants Condition="'$(TargetGroup)'=='netstandard1.1'">$(DefineConstants);netstandard11</DefineConstants>
- <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetGroup)'=='netstandard1.1' AND '$(OSGroup)'=='AnyOS'">SR.PlatformNotSupported_RuntimeInformation</GeneratePlatformNotSupportedAssemblyMessage>
- <!-- use netstandard1.1 refs for win8 and wpa81 -->
- <RefPath Condition="'$(TargetGroup)'=='wpa81' OR '$(TargetGroup)'=='win8'">$(RefRootPath)/netstandard1.1</RefPath>
- <!-- For net45 use the netstandard1.1 contract for APICompat -->
- <ContractAssemblyPath Condition="'$(TargetGroup)'=='net45'">$(RefRootPath)/netstandard1.1</ContractAssemblyPath>
- <!-- Clear runtime for wpa81 & win8: these project types don't use project.json and need to resolve without a runtime -->
- <PackageTargetRuntime Condition="'$(TargetGroup)'=='wpa81' OR '$(TargetGroup)'=='win8'">
- </PackageTargetRuntime>
- <ValidPInvokeMappings Condition="'$(TargetGroup)'=='wpa81' OR '$(TargetGroup)'=='win8'">$(MSBuildThisFileDirectory)PInvokeAnalyzer_win8-wpa81-APIs.txt</ValidPInvokeMappings>
<Configurations>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</Configurations>
</PropertyGroup>
- <ItemGroup Condition="'$(TargetsUnix)'=='true'">
+ <ItemGroup>
+ <Compile Include="System\Runtime\InteropServices\RuntimeInformation\RuntimeInformation.cs" />
+ <Compile Include="System\Runtime\InteropServices\RuntimeInformation\Architecture.cs" />
+ <Compile Include="System\Runtime\InteropServices\RuntimeInformation\OSPlatform.cs" />
+ </ItemGroup>
+ <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <Compile Include="System\Runtime\InteropServices\RuntimeInformation\RuntimeInformation.Unix.cs" />
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.GetUnixName.cs">
<Link>Common\Interop\Unix\System.Native\Interop.GetUnixName.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\Interop.Libraries.cs">
<Link>Common\Interop\Unix\Interop.Libraries.cs</Link>
</Compile>
- <Compile Include="System\Runtime\InteropServices\RuntimeInformation\RuntimeInformation.Unix.cs" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetsWindows)'=='true' And ('$(TargetGroup)' != 'win8' AND '$(TargetGroup)' != 'wpa81' and '$(TargetGroup)' != 'netstandard1.1' and '$(TargetGroup)' != 'uap' and '$(TargetGroup)' != 'uapaot')">
+ <ItemGroup Condition="'$(TargetsWindows)' == 'true' and '$(TargetGroup)' != 'uap' and '$(TargetGroup)' != 'uapaot'">
<Compile Include="$(CommonPath)\Interop\Windows\NtDll\Interop.RtlGetVersion.cs">
<Link>Common\Interop\Windows\NtDll\Interop.RtlGetVersion.cs</Link>
</Compile>
<Link>Common\Interop\Windows\NtDll\Interop.RTL_OSVERSIONINFOEX.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsWindows)'=='true' ">
+ <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="System\Runtime\InteropServices\RuntimeInformation\RuntimeInformation.Windows.cs" />
<Compile Include="$(CommonPath)\Interop\Windows\Interop.Libraries.cs">
<Link>Common\Interop\Windows\Interop.Libraries.cs</Link>
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.SYSTEM_INFO.cs">
<Link>Common\Interop\Windows\kernel32\Interop.SYSTEM_INFO.cs</Link>
</Compile>
- </ItemGroup>
- <ItemGroup Condition=" '$(TargetsWindows)'=='true' AND '$(TargetGroup)' != 'win8' AND '$(TargetGroup)' != 'wpa81'">
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.GetSystemInfo.cs">
<Link>Common\Interop\Windows\kernel32\Interop.GetSystemInfo.cs</Link>
</Compile>
<Reference Include="System.Runtime.InteropServices" />
<Reference Include="System.Threading" />
</ItemGroup>
- <ItemGroup Condition="'$(TargetGroup)'!='netstandard1.1' OR '$(OSGroup)'!='AnyOS'">
- <Compile Include="System\Runtime\InteropServices\RuntimeInformation\RuntimeInformation.cs" />
- <Compile Include="System\Runtime\InteropServices\RuntimeInformation\Architecture.cs" />
- <Compile Include="System\Runtime\InteropServices\RuntimeInformation\OSPlatform.cs" />
- </ItemGroup>
</Project>
\ No newline at end of file
{
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
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)
{
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;
{
#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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<ProjectGuid>{81A05E2E-E3AE-4246-B4E6-DD5F31FB71F9}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AssemblyName>System.Security.Cryptography.Algorithms</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>$(DefineConstants);INTERNAL_ASYMMETRIC_IMPLEMENTATIONS</DefineConstants>
<NoWarn>CS3016;CA5351;$(NoWarn)</NoWarn>
<DefineConstants Condition="'$(TargetGroup)' == 'uap'">$(DefineConstants);uap</DefineConstants>
+ <DefineConstants Condition="'$(TargetGroup)'=='netcoreapp'">$(DefineConstants);netcoreapp</DefineConstants>
<Configurations>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</Configurations>
</PropertyGroup>
- <PropertyGroup Condition="'$(TargetGroup)'=='netcoreapp'">
- <DefineConstants>$(DefineConstants);netcoreapp</DefineConstants>
- </PropertyGroup>
<ItemGroup>
<Compile Include="Internal\Cryptography\AesImplementation.cs" />
<Compile Include="Internal\Cryptography\DesImplementation.cs" />
<Link>Common\System\Security\Cryptography\Asn1\SubjectPublicKeyInfoAsn.cs</Link>
</Compile>
</ItemGroup>
- <ItemGroup Condition=" '$(TargetsWindows)' == 'true' ">
+ <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
<Compile Include="System\Security\Cryptography\AesGcm.Windows.cs" />
<Compile Include="System\Security\Cryptography\AesCcm.Windows.cs" />
<Compile Include="System\Security\Cryptography\AesAEAD.Windows.cs" />