Imported Upstream version 5.0.0.42

Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-04-10 11:41:01 +00:00
parent 1190d13a04
commit 6bdd276d05
19939 changed files with 3099680 additions and 93811 deletions

View File

@@ -0,0 +1 @@
4f37419b0bb13703a341d9887b3aeab3fc16bef2

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\dir.props" />
<PropertyGroup>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<IsNETCoreApp>true</IsNETCoreApp>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
uap;
</BuildConfigurations>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<ItemGroup>
<Project Include="System.Net.Primitives.csproj" />
<Project Include="System.Net.Primitives.csproj">
<TargetGroup>netcoreapp</TargetGroup>
</Project>
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
</Project>

View File

@@ -0,0 +1,494 @@
// 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
{
[System.FlagsAttribute]
public enum AuthenticationSchemes
{
Anonymous = 32768,
Basic = 8,
Digest = 1,
IntegratedWindowsAuthentication = 6,
Negotiate = 2,
None = 0,
Ntlm = 4,
}
public sealed partial class Cookie
{
public Cookie() { }
public Cookie(string name, string value) { }
public Cookie(string name, string value, string path) { }
public Cookie(string name, string value, string path, string domain) { }
public string Comment { get { throw null; } set { } }
public System.Uri CommentUri { get { throw null; } set { } }
public bool Discard { get { throw null; } set { } }
public string Domain { get { throw null; } set { } }
public bool Expired { get { throw null; } set { } }
public System.DateTime Expires { get { throw null; } set { } }
public bool HttpOnly { get { throw null; } set { } }
public string Name { get { throw null; } set { } }
public string Path { get { throw null; } set { } }
public string Port { get { throw null; } set { } }
public bool Secure { get { throw null; } set { } }
public System.DateTime TimeStamp { get { throw null; } }
public string Value { get { throw null; } set { } }
public int Version { get { throw null; } set { } }
public override bool Equals(object comparand) { throw null; }
public override int GetHashCode() { throw null; }
public override string ToString() { throw null; }
}
public partial class CookieCollection : System.Collections.ICollection, System.Collections.IEnumerable
{
public CookieCollection() { }
public int Count { get { throw null; } }
public System.Net.Cookie this[string name] { get { throw null; } }
public System.Net.Cookie this[int index] { get { throw null; } }
public bool IsSynchronized { get { throw null; } }
public object SyncRoot { get { throw null; } }
public void Add(System.Net.Cookie cookie) { }
public void Add(System.Net.CookieCollection cookies) { }
public System.Collections.IEnumerator GetEnumerator() { throw null; }
public void CopyTo(System.Array array, int index) { }
public void CopyTo(Cookie[] array, int index) { }
public bool IsReadOnly { get { throw null; } }
}
public partial class CookieContainer
{
public const int DefaultCookieLengthLimit = 4096;
public const int DefaultCookieLimit = 300;
public const int DefaultPerDomainCookieLimit = 20;
public CookieContainer() { }
public int Capacity { get { throw null; } set { } }
public int Count { get { throw null; } }
public int MaxCookieSize { get { throw null; } set { } }
public int PerDomainCapacity { get { throw null; } set { } }
public void Add(System.Uri uri, System.Net.Cookie cookie) { }
public void Add(System.Uri uri, System.Net.CookieCollection cookies) { }
public string GetCookieHeader(System.Uri uri) { throw null; }
public System.Net.CookieCollection GetCookies(System.Uri uri) { throw null; }
public void SetCookies(System.Uri uri, string cookieHeader) { }
public CookieContainer(int capacity) { }
public CookieContainer(int capacity, int perDomainCapacity, int maxCookieSize) { }
public void Add(CookieCollection cookies) { }
public void Add(Cookie cookie) { }
}
public partial class CookieException : System.FormatException, System.Runtime.Serialization.ISerializable
{
public CookieException() { }
protected CookieException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
}
public partial class CredentialCache : System.Collections.IEnumerable, System.Net.ICredentials, System.Net.ICredentialsByHost
{
public CredentialCache() { }
public static System.Net.ICredentials DefaultCredentials { get { throw null; } }
public static System.Net.NetworkCredential DefaultNetworkCredentials { get { throw null; } }
public void Add(string host, int port, string authenticationType, System.Net.NetworkCredential credential) { }
public void Add(System.Uri uriPrefix, string authType, System.Net.NetworkCredential cred) { }
public System.Net.NetworkCredential GetCredential(string host, int port, string authenticationType) { throw null; }
public System.Net.NetworkCredential GetCredential(System.Uri uriPrefix, string authType) { throw null; }
public System.Collections.IEnumerator GetEnumerator() { throw null; }
public void Remove(string host, int port, string authenticationType) { }
public void Remove(System.Uri uriPrefix, string authType) { }
}
[System.FlagsAttribute]
public enum DecompressionMethods
{
Deflate = 2,
GZip = 1,
None = 0,
}
public partial class DnsEndPoint : System.Net.EndPoint
{
public DnsEndPoint(string host, int port) { }
public DnsEndPoint(string host, int port, System.Net.Sockets.AddressFamily addressFamily) { }
public override System.Net.Sockets.AddressFamily AddressFamily { get { throw null; } }
public string Host { get { throw null; } }
public int Port { get { throw null; } }
public override bool Equals(object comparand) { throw null; }
public override int GetHashCode() { throw null; }
public override string ToString() { throw null; }
}
public abstract partial class EndPoint
{
protected EndPoint() { }
public virtual System.Net.Sockets.AddressFamily AddressFamily { get { throw null; } }
public virtual System.Net.EndPoint Create(System.Net.SocketAddress socketAddress) { throw null; }
public virtual System.Net.SocketAddress Serialize() { throw null; }
}
public enum HttpStatusCode
{
Accepted = 202,
Ambiguous = 300,
BadGateway = 502,
BadRequest = 400,
Conflict = 409,
Continue = 100,
Created = 201,
ExpectationFailed = 417,
Forbidden = 403,
Found = 302,
GatewayTimeout = 504,
Gone = 410,
HttpVersionNotSupported = 505,
InternalServerError = 500,
LengthRequired = 411,
MethodNotAllowed = 405,
Moved = 301,
MovedPermanently = 301,
MultipleChoices = 300,
NoContent = 204,
NonAuthoritativeInformation = 203,
NotAcceptable = 406,
NotFound = 404,
NotImplemented = 501,
NotModified = 304,
OK = 200,
PartialContent = 206,
PaymentRequired = 402,
PreconditionFailed = 412,
ProxyAuthenticationRequired = 407,
Redirect = 302,
RedirectKeepVerb = 307,
RedirectMethod = 303,
RequestedRangeNotSatisfiable = 416,
RequestEntityTooLarge = 413,
RequestTimeout = 408,
RequestUriTooLong = 414,
ResetContent = 205,
SeeOther = 303,
ServiceUnavailable = 503,
SwitchingProtocols = 101,
TemporaryRedirect = 307,
Unauthorized = 401,
UnsupportedMediaType = 415,
Unused = 306,
UpgradeRequired = 426,
UseProxy = 305,
}
public partial interface ICredentials
{
System.Net.NetworkCredential GetCredential(System.Uri uri, string authType);
}
public partial interface ICredentialsByHost
{
System.Net.NetworkCredential GetCredential(string host, int port, string authenticationType);
}
public partial class IPAddress
{
public static readonly System.Net.IPAddress Any;
public static readonly System.Net.IPAddress Broadcast;
public static readonly System.Net.IPAddress IPv6Any;
public static readonly System.Net.IPAddress IPv6Loopback;
public static readonly System.Net.IPAddress IPv6None;
public static readonly System.Net.IPAddress Loopback;
public static readonly System.Net.IPAddress None;
public IPAddress(byte[] address) { }
public IPAddress(byte[] address, long scopeid) { }
public IPAddress(long newAddress) { }
public System.Net.Sockets.AddressFamily AddressFamily { get { throw null; } }
public bool IsIPv4MappedToIPv6 { get { throw null; } }
public bool IsIPv6LinkLocal { get { throw null; } }
public bool IsIPv6Multicast { get { throw null; } }
public bool IsIPv6SiteLocal { get { throw null; } }
public bool IsIPv6Teredo { get { throw null; } }
public long ScopeId { get { throw null; } set { } }
public override bool Equals(object comparand) { throw null; }
public byte[] GetAddressBytes() { throw null; }
public override int GetHashCode() { throw null; }
public static short HostToNetworkOrder(short host) { throw null; }
public static int HostToNetworkOrder(int host) { throw null; }
public static long HostToNetworkOrder(long host) { throw null; }
public static bool IsLoopback(System.Net.IPAddress address) { throw null; }
public System.Net.IPAddress MapToIPv4() { throw null; }
public System.Net.IPAddress MapToIPv6() { throw null; }
public static short NetworkToHostOrder(short network) { throw null; }
public static int NetworkToHostOrder(int network) { throw null; }
public static long NetworkToHostOrder(long network) { throw null; }
public static System.Net.IPAddress Parse(string ipString) { throw null; }
public override string ToString() { throw null; }
public static bool TryParse(string ipString, out System.Net.IPAddress address) { throw null; }
[Obsolete("This property has been deprecated. It is address family dependent. Please use IPAddress.Equals method to perform comparisons. http://go.microsoft.com/fwlink/?linkid=14202")]
public long Address { get { throw null; } set { } }
}
public partial class IPEndPoint : System.Net.EndPoint
{
public const int MaxPort = 65535;
public const int MinPort = 0;
public IPEndPoint(long address, int port) { }
public IPEndPoint(System.Net.IPAddress address, int port) { }
public System.Net.IPAddress Address { get { throw null; } set { } }
public override System.Net.Sockets.AddressFamily AddressFamily { get { throw null; } }
public int Port { get { throw null; } set { } }
public override System.Net.EndPoint Create(System.Net.SocketAddress socketAddress) { throw null; }
public override bool Equals(object comparand) { throw null; }
public override int GetHashCode() { throw null; }
public override System.Net.SocketAddress Serialize() { throw null; }
public override string ToString() { throw null; }
}
public partial interface IWebProxy
{
System.Net.ICredentials Credentials { get; set; }
System.Uri GetProxy(System.Uri destination);
bool IsBypassed(System.Uri host);
}
public partial class NetworkCredential : System.Net.ICredentials, System.Net.ICredentialsByHost
{
public NetworkCredential() { }
public NetworkCredential(string userName, string password) { }
[System.CLSCompliant(false)]
public NetworkCredential(string userName, System.Security.SecureString password) { }
public NetworkCredential(string userName, string password, string domain) { }
[System.CLSCompliant(false)]
public NetworkCredential(string userName, System.Security.SecureString password, string domain) { }
public string Domain { get { throw null; } set { } }
public string Password { get { throw null; } set { } }
[System.CLSCompliant(false)]
public System.Security.SecureString SecurePassword { get { throw null; } set { } }
public string UserName { get { throw null; } set { } }
public System.Net.NetworkCredential GetCredential(string host, int port, string authenticationType) { throw null; }
public System.Net.NetworkCredential GetCredential(System.Uri uri, string authType) { throw null; }
}
public partial class SocketAddress
{
public SocketAddress(System.Net.Sockets.AddressFamily family) { }
public SocketAddress(System.Net.Sockets.AddressFamily family, int size) { }
public System.Net.Sockets.AddressFamily Family { get { throw null; } }
public byte this[int offset] { get { throw null; } set { } }
public int Size { get { throw null; } }
public override bool Equals(object comparand) { throw null; }
public override int GetHashCode() { throw null; }
public override string ToString() { throw null; }
}
public abstract partial class TransportContext
{
protected TransportContext() { }
public abstract System.Security.Authentication.ExtendedProtection.ChannelBinding GetChannelBinding(System.Security.Authentication.ExtendedProtection.ChannelBindingKind kind);
}
public static class HttpVersion
{
public static readonly Version Unknown = new Version(0, 0);
public static readonly Version Version10 = new Version(1, 0);
public static readonly Version Version11 = new Version(1, 1);
public static readonly Version Version20 = new Version(2, 0);
}
}
namespace System.Net.Cache
{
public enum RequestCacheLevel
{
Default = 0,
BypassCache = 1,
CacheOnly = 2,
CacheIfAvailable = 3,
Revalidate = 4,
Reload = 5,
NoCacheNoStore = 6
}
public class RequestCachePolicy
{
public RequestCachePolicy() { }
public RequestCachePolicy(System.Net.Cache.RequestCacheLevel level) { }
public System.Net.Cache.RequestCacheLevel Level { get { throw null; } }
public override string ToString() { throw null; }
}
}
namespace System.Net.NetworkInformation
{
public partial class IPAddressCollection : System.Collections.Generic.ICollection<System.Net.IPAddress>, System.Collections.Generic.IEnumerable<System.Net.IPAddress>, System.Collections.IEnumerable
{
protected internal IPAddressCollection() { }
public virtual int Count { get { throw null; } }
public virtual bool IsReadOnly { get { throw null; } }
public virtual System.Net.IPAddress this[int index] { get { throw null; } }
public virtual void Add(System.Net.IPAddress address) { }
public virtual void Clear() { }
public virtual bool Contains(System.Net.IPAddress address) { throw null; }
public virtual void CopyTo(System.Net.IPAddress[] array, int offset) { }
public virtual System.Collections.Generic.IEnumerator<System.Net.IPAddress> GetEnumerator() { throw null; }
public virtual bool Remove(System.Net.IPAddress address) { throw null; }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
}
}
namespace System.Net.Security
{
public enum AuthenticationLevel
{
MutualAuthRequested = 1,
MutualAuthRequired = 2,
None = 0,
}
[System.FlagsAttribute]
public enum SslPolicyErrors
{
None = 0,
RemoteCertificateChainErrors = 4,
RemoteCertificateNameMismatch = 2,
RemoteCertificateNotAvailable = 1,
}
}
namespace System.Net.Sockets
{
public enum AddressFamily
{
AppleTalk = 16,
Atm = 22,
Banyan = 21,
Ccitt = 10,
Chaos = 5,
Cluster = 24,
DataKit = 9,
DataLink = 13,
DecNet = 12,
Ecma = 8,
FireFox = 19,
HyperChannel = 15,
Ieee12844 = 25,
ImpLink = 3,
InterNetwork = 2,
InterNetworkV6 = 23,
Ipx = 6,
Irda = 26,
Iso = 7,
Lat = 14,
Max = 29,
NetBios = 17,
NetworkDesigners = 28,
NS = 6,
Osi = 7,
Pup = 4,
Sna = 11,
Unix = 1,
Unknown = -1,
Unspecified = 0,
VoiceView = 18,
}
public enum SocketError
{
AccessDenied = 10013,
AddressAlreadyInUse = 10048,
AddressFamilyNotSupported = 10047,
AddressNotAvailable = 10049,
AlreadyInProgress = 10037,
ConnectionAborted = 10053,
ConnectionRefused = 10061,
ConnectionReset = 10054,
DestinationAddressRequired = 10039,
Disconnecting = 10101,
Fault = 10014,
HostDown = 10064,
HostNotFound = 11001,
HostUnreachable = 10065,
InProgress = 10036,
Interrupted = 10004,
InvalidArgument = 10022,
IOPending = 997,
IsConnected = 10056,
MessageSize = 10040,
NetworkDown = 10050,
NetworkReset = 10052,
NetworkUnreachable = 10051,
NoBufferSpaceAvailable = 10055,
NoData = 11004,
NoRecovery = 11003,
NotConnected = 10057,
NotInitialized = 10093,
NotSocket = 10038,
OperationAborted = 995,
OperationNotSupported = 10045,
ProcessLimit = 10067,
ProtocolFamilyNotSupported = 10046,
ProtocolNotSupported = 10043,
ProtocolOption = 10042,
ProtocolType = 10041,
Shutdown = 10058,
SocketError = -1,
SocketNotSupported = 10044,
Success = 0,
SystemNotReady = 10091,
TimedOut = 10060,
TooManyOpenSockets = 10024,
TryAgain = 11002,
TypeNotFound = 10109,
VersionNotSupported = 10092,
WouldBlock = 10035,
}
public partial class SocketException : System.ComponentModel.Win32Exception
{
public SocketException() { }
public SocketException(int errorCode) { }
protected SocketException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public override int ErrorCode { get { throw null; } }
public override string Message { get { throw null; } }
public System.Net.Sockets.SocketError SocketErrorCode { get { throw null; } }
}
}
namespace System.Security.Authentication
{
public enum CipherAlgorithmType
{
Aes = 26129,
Aes128 = 26126,
Aes192 = 26127,
Aes256 = 26128,
Des = 26113,
None = 0,
Null = 24576,
Rc2 = 26114,
Rc4 = 26625,
TripleDes = 26115,
}
public enum ExchangeAlgorithmType
{
DiffieHellman = 43522,
None = 0,
RsaKeyX = 41984,
RsaSign = 9216,
}
public enum HashAlgorithmType
{
Md5 = 32771,
None = 0,
Sha1 = 32772,
Sha256 = 32780,
Sha384 = 32781,
Sha512 = 32782
}
[System.FlagsAttribute]
public enum SslProtocols
{
None = 0,
[Obsolete("This value has been deprecated. It is no longer supported. http://go.microsoft.com/fwlink/?linkid=14202")]
Ssl2 = 12,
[Obsolete("This value has been deprecated. It is no longer supported. http://go.microsoft.com/fwlink/?linkid=14202")]
Ssl3 = 48,
Tls = 192,
Tls11 = 768,
Tls12 = 3072,
[Obsolete("This value has been deprecated. It is no longer supported. http://go.microsoft.com/fwlink/?linkid=14202")]
Default = Ssl3 | Tls
}
}
namespace System.Security.Authentication.ExtendedProtection
{
public abstract partial class ChannelBinding : Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid
{
protected ChannelBinding() : base(default(bool)) { }
protected ChannelBinding(bool ownsHandle) : base(default(bool)) { }
public abstract int Size { get; }
}
public enum ChannelBindingKind
{
Endpoint = 26,
Unique = 25,
Unknown = 0,
}
}

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Release|AnyCPU'" />
<ItemGroup>
<Compile Include="System.Net.Primitives.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Microsoft.Win32.Primitives\ref\Microsoft.Win32.Primitives.csproj" />
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
<ProjectReference Include="..\..\System.Runtime.InteropServices\ref\System.Runtime.InteropServices.csproj" />
<ProjectReference Include="..\..\System.Runtime.Handles\ref\System.Runtime.Handles.csproj" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>

View File

@@ -0,0 +1,4 @@
Compat issues with assembly System.Net.Primitives:
CannotRemoveBaseTypeOrInterface : Type 'System.Net.Sockets.SocketException' does not inherit from base type 'System.Runtime.InteropServices.ExternalException' in the implementation but it does in the contract.
MembersMustExist : Member 'System.Net.Sockets.SocketException..ctor(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)' does not exist in the implementation but it does exist in the contract.
Total Issues: 2

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfigurations>
uap101-Windows_NT;
netcoreapp-Unix;
netcoreapp-Windows_NT;
net463-Windows_NT;
</BuildConfigurations>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1 @@
089e2fe7d64e71cbf5bdc40532ec84185278dbc6

View File

@@ -0,0 +1,235 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<AssemblyName>System.Net.Primitives</AssemblyName>
<OutputType>Library</OutputType>
<ProjectGuid>{8772BC91-7B55-49B9-94FA-4B1BE5BEAB55}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<EnableWinRT Condition="'$(TargetGroup)' == 'uap101'">true</EnableWinRT>
<IsPartialFacadeAssembly Condition="'$(TargetGroup)' == 'net463'">true</IsPartialFacadeAssembly>
</PropertyGroup>
<PropertyGroup Condition="'$(EnableWinRT)' != 'true' AND '$(TargetGroup)' == 'netcoreapp'">
<DefineConstants>$(DefineConstants);FEATURE_CORECLR</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(EnableWinRT)' == 'true'">
<DefineConstants>$(DefineConstants);NETNATIVE</DefineConstants>
</PropertyGroup>
<!-- Help VS understand available configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='uap101-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='uap101-Windows_NT-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp-Unix-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp-Unix-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp-Windows_NT-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='net463-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='net463-Windows_NT-Release|AnyCPU'" />
<PropertyGroup>
<!-- SYSTEM_NET_PRIMITIVES_DLL is required to allow source-level code sharing for types defined within the
System.Net.Internals namespace. -->
<DefineConstants>$(DefineConstants);SYSTEM_NET_PRIMITIVES_DLL</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'uap101'">
<Compile Include="System\Net\AuthenticationSchemes.cs" />
<Compile Include="System\Net\Cookie.cs" />
<Compile Include="System\Net\CookieContainer.cs" />
<Compile Include="System\Net\CookieCollection.cs" />
<Compile Include="System\Net\CookieException.cs" />
<Compile Include="System\Net\CredentialCache.cs" />
<Compile Include="System\Net\DecompressionMethods.cs" />
<Compile Include="System\Net\DnsEndPoint.cs" />
<Compile Include="System\Net\EndPoint.cs" />
<Compile Include="System\Net\HttpStatusCode.cs" />
<Compile Include="System\Net\HttpVersion.cs" />
<Compile Include="System\Net\ICredentials.cs" />
<Compile Include="System\Net\ICredentialsByHost.cs" />
<Compile Include="System\Net\IPAddress.cs" />
<Compile Include="System\Net\IPAddressParser.cs" />
<Compile Include="System\Net\IPEndPoint.cs" />
<Compile Include="System\Net\IWebProxy.cs" />
<Compile Include="System\Net\NetEventSource.Primitives.cs" />
<Compile Include="System\Net\NetworkCredential.cs" />
<Compile Include="System\Net\TransportContext.cs" />
<Compile Include="System\Net\SocketException.cs" />
<Compile Include="System\Net\SocketException.netstandard.cs" Condition="'$(TargetGroup)' == 'netcoreapp'" />
<Compile Include="System\Net\SecureProtocols\NegotiateEnumTypes.cs" />
<Compile Include="System\Net\SecureProtocols\SslEnumTypes.cs" />
<Compile Include="System\Net\Security\SslPolicyErrors.cs" />
<Compile Include="System\Net\Sockets\AddressFamily.cs" />
<Compile Include="System\Net\Sockets\SocketError.cs" />
<Compile Include="System\Net\NetworkInformation\IPAddressCollection.cs" />
<Compile Include="System\Net\Cache\RequestCacheLevel.cs" />
<Compile Include="System\Net\Cache\RequestCachePolicy.cs" />
<Compile Include="System\Security\Authentication\ExtendedProtection\ChannelBinding.cs" />
<Compile Include="System\Security\Authentication\ExtendedProtection\ChannelBindingKind.cs" />
<Compile Include="$(CommonPath)\System\StringExtensions.cs">
<Link>Common\System\StringExtensions.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\ByteOrder.cs">
<Link>Common\System\Net\ByteOrder.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\IPAddressParserStatics.cs">
<Link>Common\System\Net\IPAddressParserStatics.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\HttpKnownHeaderNames.cs">
<Link>Common\System\Net\HttpKnownHeaderNames.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\TcpValidationHelpers.cs">
<Link>Common\System\Net\TcpValidationHelpers.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\UriScheme.cs">
<Link>Common\System\Net\UriScheme.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\SocketAddress.cs">
<Link>Common\System\Net\SocketAddress.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\NetworkInformation\HostInformation.cs">
<Link>Common\System\Net\NetworkInformation\HostInformation.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\IO\StringBuilderCache.cs">
<Link>Common\System\IO\StringBuilderCache.cs</Link>
</Compile>
<!-- Logging -->
<Compile Include="$(CommonPath)\System\Net\Shims\TraceSource.cs">
<Link>Common\System\Net\Shims\TraceSource.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Logging\NetEventSource.Common.cs">
<Link>Common\System\Net\Logging\NetEventSource.Common.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\InternalException.cs">
<Link>Common\System\Net\InternalException.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\NotImplemented.cs">
<Link>Common\System\NotImplemented.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Crypt32\Interop.Alg.cs">
<Link>Common\Interop\Windows\Crypt32\Interop.Alg.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\SChannel\Interop.SchProtocols.cs">
<Link>Common\Interop\Windows\SChannel\Interop.SchProtocols.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Winsock\Interop.ErrorCodes.cs">
<Link>Common\Interop\Windows\Winsock\Interop.ErrorCodes.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup Condition=" '$(TargetsWindows)' == 'true' AND ('$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'uap101')">
<Compile Include="System\Net\IPAddressPal.Windows.cs" />
<Compile Include="System\Net\SocketException.Windows.cs" />
<Compile Include="$(CommonPath)\System\Net\SocketAddressPal.Windows.cs">
<Link>Common\System\Net\SocketAddressPal.Windows.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\IpHlpApi\Interop.ErrorCodes.cs">
<Link>Common\Interop\Windows\IpHlpApi\Interop.ErrorCodes.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\IpHlpApi\Interop.FIXED_INFO.cs">
<Link>Common\Interop\Windows\IpHlpApi\Interop.FIXED_INFO.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\IpHlpApi\Interop.IP_ADDR_STRING.cs">
<Link>Common\Interop\Windows\IpHlpApi\Interop.IP_ADDR_STRING.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Interop.Libraries.cs">
<Link>Common\Interop\Windows\Interop.Libraries.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\NtDll\Interop.NtStatus.cs">
<Link>Common\Interop\Windows\NtDll\Interop.NtStatus.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\NtDll\Interop.RtlIpv4AddressToStringEx.cs">
<Link>Common\Interop\Windows\NtDll\Interop.RtlIpv4AddressToStringEx.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\NtDll\Interop.RtlIpv4StringToAddressEx.cs">
<Link>Common\Interop\Windows\NtDll\Interop.RtlIpv4StringToAddressEx.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\NtDll\Interop.RtlIpv6AddressToStringEx.cs">
<Link>Common\Interop\Windows\NtDll\Interop.RtlIpv6AddressToStringEx.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\NtDll\Interop.RtlIpv6StringToAddressEx.cs">
<Link>Common\Interop\Windows\NtDll\Interop.RtlIpv6StringToAddressEx.cs</Link>
</Compile>
</ItemGroup>
<!-- Windows : Win32 only -->
<ItemGroup Condition="'$(TargetsWindows)' == 'true' AND '$(EnableWinRT)' != 'true' AND ('$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'uap101')">
<Compile Include="$(CommonPath)\System\Net\NetworkInformation\HostInformationPal.Windows.cs">
<Link>Common\System\Net\NetworkInformation\HostInformationPal.Windows.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Microsoft\Win32\SafeHandles\SafeLocalAllocHandle.cs">
<Link>Common\Microsoft\Win32\SafeHandles\SafeLocalAllocHandle.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\IpHlpApi\Interop.GetNetworkParams.cs">
<Link>Common\Interop\Windows\IpHlpApi\Interop.GetNetworkParams.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.LocalAlloc.cs">
<Link>Common\Interop\Windows\kernel32\Interop.LocalAlloc.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.LocalAlloc.Constants.cs">
<Link>Common\Interop\Windows\kernel32\Interop.LocalAlloc.Constants.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.LocalFree.cs">
<Link>Common\Interop\Windows\kernel32\Interop.LocalFree.cs</Link>
</Compile>
</ItemGroup>
<!-- Windows : Win32 + WinRT -->
<ItemGroup Condition="'$(TargetsWindows)' == 'true' AND '$(EnableWinRT)' == 'true' AND ('$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'uap101')">
<Compile Include="$(CommonPath)\System\Net\NetworkInformation\HostInformationPal.Uap.cs">
<Link>Common\System\Net\NetworkInformation\HostInformationPal.Uap.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup Condition=" '$(TargetsUnix)' == 'true' AND ('$(TargetGroup)' == 'netcoreapp' or '$(TargetGroup)' == 'uap101')">
<Compile Include="System\Net\IPAddressPal.Unix.cs" />
<Compile Include="System\Net\SocketException.Unix.cs" />
<Compile Include="$(CommonPath)\System\Net\SocketAddressPal.Unix.cs">
<Link>Common\System\Net\SocketAddressPal.Unix.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\NetworkInformation\HostInformationPal.Unix.cs">
<Link>Common\System\Net\NetworkInformation\HostInformationPal.Unix.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\System\Net\Sockets\SocketErrorPal.Unix.cs">
<Link>Common\System\Net\Sockets\SocketErrorPal.Unix.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\Interop.Errors.cs">
<Link>Common\Interop\Unix\Interop.Errors.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\Interop.Libraries.cs">
<Link>Common\Interop\Unix\Interop.Libraries.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.GetDomainName.cs">
<Link>Common\Interop\Unix\System.Native\Interop.GetDomainName.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.GetHostName.cs">
<Link>Common\Interop\Unix\System.Native\Interop.GetHostName.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.GetNameInfo.cs">
<Link>Common\Interop\Unix\System.Native\Interop.GetNameInfo.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.HostEntry.cs">
<Link>Common\Interop\Unix\System.Native\Interop.HostEntry.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.IPAddress.cs">
<Link>Common\Interop\Unix\System.Native\Interop.IPAddress.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.SocketAddress.cs">
<Link>Interop\Unix\System.Native\Interop.SocketAddress.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'net463'">
<TargetingPackReference Include="mscorlib" />
<TargetingPackReference Include="System" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'uap101'">
<ProjectReference Include="$(SourceDir)/mscorlib.WinRT-Facade/mscorlib.WinRT-Facade.csproj" />
<!-- ToDo: remove once we have new packages https://github.com/dotnet/corefx/issues/12838 -->
<ProjectReference Include="..\..\System.Security.Principal\ref\System.Security.Principal.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.Win32.Primitives" />
<Reference Include="System.Collections" />
<Reference Include="System.Diagnostics.Contracts" />
<Reference Include="System.Diagnostics.Debug" />
<Reference Include="System.Diagnostics.Tracing" />
<Reference Include="System.Resources.ResourceManager" />
<Reference Include="System.Runtime" />
<Reference Include="System.Runtime.Extensions" />
<Reference Include="System.Runtime.InteropServices" />
<Reference Include="System.Threading" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>

View File

@@ -0,0 +1,20 @@
// 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.
namespace System.Net
{
[Flags]
public enum AuthenticationSchemes
{
None = 0x00000000,
Digest = 0x00000001,
Negotiate = 0x00000002,
Ntlm = 0x00000004,
Basic = 0x00000008,
Anonymous = 0x00008000,
IntegratedWindowsAuthentication = Negotiate | Ntlm,
}
}

View File

@@ -0,0 +1,17 @@
// 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.
namespace System.Net.Cache
{
public enum RequestCacheLevel
{
Default = 0,
BypassCache = 1,
CacheOnly = 2,
CacheIfAvailable = 3,
Revalidate = 4,
Reload = 5,
NoCacheNoStore = 6
}
}

View File

@@ -0,0 +1,28 @@
// 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.
namespace System.Net.Cache
{
public class RequestCachePolicy
{
public RequestCachePolicy()
{
Level = RequestCacheLevel.Default;
}
public RequestCachePolicy(RequestCacheLevel level)
{
if (level < RequestCacheLevel.Default || level > RequestCacheLevel.NoCacheNoStore)
{
throw new ArgumentOutOfRangeException(nameof(level));
}
Level = level;
}
public RequestCacheLevel Level { get; }
public override string ToString() => "Level:" + Level.ToString();
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,240 @@
// 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.Collections;
using System.Collections.Generic;
namespace System.Net
{
// CookieCollection
//
// A list of cookies maintained in Sorted order. Only one cookie with matching Name/Domain/Path
[Serializable]
public class CookieCollection : ICollection
{
internal enum Stamp
{
Check = 0,
Set = 1,
SetToUnused = 2,
SetToMaxUsed = 3,
}
private readonly List<Cookie> _list = new List<Cookie>();
private DateTime _timeStamp = DateTime.MinValue;
private bool _hasOtherVersions;
public CookieCollection()
{
}
public Cookie this[int index]
{
get
{
if (index < 0 || index >= _list.Count)
{
throw new ArgumentOutOfRangeException(nameof(index));
}
return _list[index];
}
}
public Cookie this[string name]
{
get
{
foreach (Cookie c in _list)
{
if (string.Equals(c.Name, name, StringComparison.OrdinalIgnoreCase))
{
return c;
}
}
return null;
}
}
public void Add(Cookie cookie)
{
if (cookie == null)
{
throw new ArgumentNullException(nameof(cookie));
}
int idx = IndexOf(cookie);
if (idx == -1)
{
_list.Add(cookie);
}
else
{
_list[idx] = cookie;
}
}
public void Add(CookieCollection cookies)
{
if (cookies == null)
{
throw new ArgumentNullException(nameof(cookies));
}
foreach (Cookie cookie in cookies._list)
{
Add(cookie);
}
}
public bool IsReadOnly
{
get
{
return false;
}
}
public int Count
{
get
{
return _list.Count;
}
}
public bool IsSynchronized
{
get
{
return false;
}
}
public object SyncRoot
{
get
{
return this;
}
}
public void CopyTo(Array array, int index)
{
((ICollection)_list).CopyTo(array, index);
}
public void CopyTo(Cookie[] array, int index)
{
_list.CopyTo(array, index);
}
internal DateTime TimeStamp(Stamp how)
{
switch (how)
{
case Stamp.Set:
_timeStamp = DateTime.Now;
break;
case Stamp.SetToMaxUsed:
_timeStamp = DateTime.MaxValue;
break;
case Stamp.SetToUnused:
_timeStamp = DateTime.MinValue;
break;
case Stamp.Check:
default:
break;
}
return _timeStamp;
}
// This is for internal cookie container usage.
// For others not that _hasOtherVersions gets changed ONLY in InternalAdd
internal bool IsOtherVersionSeen
{
get
{
return _hasOtherVersions;
}
}
// If isStrict == false, assumes that incoming cookie is unique.
// If isStrict == true, replace the cookie if found same with newest Variant.
// Returns 1 if added, 0 if replaced or rejected.
internal int InternalAdd(Cookie cookie, bool isStrict)
{
int ret = 1;
if (isStrict)
{
int idx = 0;
foreach (Cookie c in _list)
{
if (CookieComparer.Compare(cookie, c) == 0)
{
ret = 0; // Will replace or reject
// Cookie2 spec requires that new Variant cookie overwrite the old one.
if (c.Variant <= cookie.Variant)
{
_list[idx] = cookie;
}
break;
}
++idx;
}
if (idx == _list.Count)
{
_list.Add(cookie);
}
}
else
{
_list.Add(cookie);
}
if (cookie.Version != Cookie.MaxSupportedVersion)
{
_hasOtherVersions = true;
}
return ret;
}
internal int IndexOf(Cookie cookie)
{
int idx = 0;
foreach (Cookie c in _list)
{
if (CookieComparer.Compare(cookie, c) == 0)
{
return idx;
}
++idx;
}
return -1;
}
internal void RemoveAt(int idx)
{
_list.RemoveAt(idx);
}
public IEnumerator GetEnumerator()
{
return _list.GetEnumerator();
}
#if DEBUG
internal void Dump()
{
if (NetEventSource.IsEnabled)
{
if (NetEventSource.IsEnabled) NetEventSource.Enter(this);
foreach (Cookie cookie in this)
{
cookie.Dump();
}
}
}
#endif
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,51 @@
// 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.Runtime.Serialization;
// The NETNative_SystemNetHttp #define is used in some source files to indicate we are compiling classes
// directly into the .NET Native System.Net.Http.dll implementation assembly in order to use internal class
// methods. Internal methods are needed in order to map cookie response headers from the WinRT Windows.Web.Http APIs.
// Windows.Web.Http is used underneath the System.Net.Http classes on .NET Native. Having other similarly
// named classes would normally conflict with the public System.Net namespace classes that are also in the
// System.Private.Networking dll. So, we need to move the classes to a different namespace. Those classes are never
// exposed up to user code so there isn't a problem. In the future, we might expose some of the internal methods
// as new public APIs and then we can remove this duplicate source code inclusion in the binaries.
#if NETNative_SystemNetHttp
namespace System.Net.Internal
#else
namespace System.Net
#endif
{
[Serializable]
public class CookieException : FormatException, ISerializable
{
public CookieException() : base()
{
}
internal CookieException(string message) : base(message)
{
}
internal CookieException(string message, Exception inner) : base(message, inner)
{
}
protected CookieException(SerializationInfo serializationInfo, StreamingContext streamingContext)
: base(serializationInfo, streamingContext)
{
}
void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
{
GetObjectData(serializationInfo, streamingContext);
}
public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
{
base.GetObjectData(serializationInfo, streamingContext);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,14 @@
// 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.
namespace System.Net
{
[Flags]
public enum DecompressionMethods
{
None = 0,
GZip = 1,
Deflate = 2
}
}

View File

@@ -0,0 +1,94 @@
// 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.Net.Sockets;
namespace System.Net
{
public class DnsEndPoint : EndPoint
{
private readonly string _host;
private readonly int _port;
private readonly AddressFamily _family;
public DnsEndPoint(string host, int port) : this(host, port, AddressFamily.Unspecified) { }
public DnsEndPoint(string host, int port, AddressFamily addressFamily)
{
if (host == null)
{
throw new ArgumentNullException(nameof(host));
}
if (String.IsNullOrEmpty(host))
{
throw new ArgumentException(SR.Format(SR.net_emptystringcall, nameof(host)));
}
if (port < IPEndPoint.MinPort || port > IPEndPoint.MaxPort)
{
throw new ArgumentOutOfRangeException(nameof(port));
}
if (addressFamily != AddressFamily.InterNetwork &&
addressFamily != AddressFamily.InterNetworkV6 &&
addressFamily != AddressFamily.Unspecified)
{
throw new ArgumentException(SR.net_sockets_invalid_optionValue_all, nameof(addressFamily));
}
_host = host;
_port = port;
_family = addressFamily;
}
public override bool Equals(object comparand)
{
DnsEndPoint dnsComparand = comparand as DnsEndPoint;
if (dnsComparand == null)
{
return false;
}
return (_family == dnsComparand._family &&
_port == dnsComparand._port &&
_host == dnsComparand._host);
}
public override int GetHashCode()
{
return StringComparer.OrdinalIgnoreCase.GetHashCode(ToString());
}
public override string ToString()
{
return _family + "/" + _host + ":" + _port;
}
public string Host
{
get
{
return _host;
}
}
public override AddressFamily AddressFamily
{
get
{
return _family;
}
}
public int Port
{
get
{
return _port;
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More