You've already forked linux-packaging-mono
Imported Upstream version 5.0.0.42
Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
This commit is contained in:
parent
1190d13a04
commit
6bdd276d05
93
external/corefx/src/System.Net.Requests/System.Net.Requests.sln
vendored
Normal file
93
external/corefx/src/System.Net.Requests/System.Net.Requests.sln
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||

|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Net.Requests.Tests", "tests\System.Net.Requests.Tests.csproj", "{851A40FE-7F07-415D-8592-5FE2096E84D3}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F} = {5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{12C1E5BE-BB3B-4BE0-AE32-B12A31350D61}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{C16D28FB-8C73-4572-A4C8-DBC4E9B4EE93}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{C13A51C0-C98C-43A9-8635-C06AF3895A69}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Net.Requests", "ref\System.Net.Requests.csproj", "{A9749593-5875-4880-99E8-41BD4796E92D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Net.Requests", "src\System.Net.Requests.csproj", "{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
DebugNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU = DebugNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU
|
||||
ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU = ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU
|
||||
DebugNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU = DebugNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU
|
||||
ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU = ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU
|
||||
DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU = DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU
|
||||
ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU = ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU
|
||||
DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU = DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU
|
||||
ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU = ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU
|
||||
DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU = DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU
|
||||
ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU = ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU
|
||||
DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU = DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU
|
||||
ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU = ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Unix-Debug|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU.Build.0 = netcoreapp-Unix-Debug|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Unix-Release|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU.Build.0 = netcoreapp-Unix-Release|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Unix-Debug|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.DebugNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU.Build.0 = netcoreapp-Unix-Debug|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Unix-Release|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.ReleaseNETCoreAppnetcoreapp-Unixnetcoreapp|AnyCPU.Build.0 = netcoreapp-Unix-Release|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.DebugNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.ReleaseNETCoreAppnetcoreapp-Windows_NTnetcoreapp|AnyCPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = net463-Windows_NT-Debug|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.Build.0 = net463-Windows_NT-Debug|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = net463-Windows_NT-Release|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.Build.0 = net463-Windows_NT-Release|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = net463-Windows_NT-Debug|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.DebugNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.Build.0 = net463-Windows_NT-Debug|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.ActiveCfg = net463-Windows_NT-Release|Any CPU
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}.ReleaseNETCoreAppnet463-Windows_NTnetcoreapp|AnyCPU.Build.0 = net463-Windows_NT-Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{851A40FE-7F07-415D-8592-5FE2096E84D3} = {851A40FE-7F07-415D-8592-5FE2096E84D3}
|
||||
{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F} = {5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
8
external/corefx/src/System.Net.Requests/dir.props
vendored
Normal file
8
external/corefx/src/System.Net.Requests/dir.props
vendored
Normal 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>
|
9
external/corefx/src/System.Net.Requests/ref/Configurations.props
vendored
Normal file
9
external/corefx/src/System.Net.Requests/ref/Configurations.props
vendored
Normal 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>
|
12
external/corefx/src/System.Net.Requests/ref/System.Net.Requests.Manual.cs
vendored
Normal file
12
external/corefx/src/System.Net.Requests/ref/System.Net.Requests.Manual.cs
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
// 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.
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// Types moved down into System.Net.WebHeaderCollection
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.WebHeaderCollection))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.HttpRequestHeader))]
|
||||
|
469
external/corefx/src/System.Net.Requests/ref/System.Net.Requests.cs
vendored
Normal file
469
external/corefx/src/System.Net.Requests/ref/System.Net.Requests.cs
vendored
Normal file
@@ -0,0 +1,469 @@
|
||||
// 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
|
||||
{
|
||||
public delegate void HttpContinueDelegate(int StatusCode, WebHeaderCollection httpHeaders);
|
||||
public class AuthenticationManager
|
||||
{
|
||||
private AuthenticationManager() { }
|
||||
public static System.Net.ICredentialPolicy CredentialPolicy { get { throw null; } set { } }
|
||||
public static System.Collections.Specialized.StringDictionary CustomTargetNameDictionary { get { throw null; } }
|
||||
public static Authorization Authenticate(string challenge, System.Net.WebRequest request, ICredentials credentials) { throw null; }
|
||||
public static Authorization PreAuthenticate(System.Net.WebRequest request, ICredentials credentials) { throw null; }
|
||||
public static void Register(IAuthenticationModule authenticationModule) { }
|
||||
public static void Unregister(IAuthenticationModule authenticationModule) { }
|
||||
public static void Unregister(string authenticationScheme) { }
|
||||
public static System.Collections.IEnumerator RegisteredModules { get { throw null; } }
|
||||
}
|
||||
public class Authorization
|
||||
{
|
||||
public Authorization(string token) { }
|
||||
public Authorization(string token, bool finished) { }
|
||||
public Authorization(string token, bool finished, string connectionGroupId) { }
|
||||
|
||||
public string Message { get { throw null; } }
|
||||
public string ConnectionGroupId { get { throw null; } }
|
||||
public bool Complete { get { throw null; } }
|
||||
public string[] ProtectionRealm { get { throw null; } set { } }
|
||||
public bool MutuallyAuthenticated { get { throw null; } set { } }
|
||||
}
|
||||
public class FileWebRequest : WebRequest, System.Runtime.Serialization.ISerializable
|
||||
{
|
||||
internal FileWebRequest() { }
|
||||
[Obsolete("Serialization is obsoleted for this type. http://go.microsoft.com/fwlink/?linkid=14202")]
|
||||
protected FileWebRequest(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) : base(serializationInfo, streamingContext) { }
|
||||
public override string ConnectionGroupName { get { throw null; } set { } }
|
||||
public override long ContentLength { get { throw null; } set { } }
|
||||
public override string ContentType { get { throw null; } set { } }
|
||||
public override System.Net.ICredentials Credentials { get { throw null; } set { } }
|
||||
public override System.Net.WebHeaderCollection Headers { get { throw null; } }
|
||||
public override string Method { get { throw null; } set { } }
|
||||
public override bool PreAuthenticate { get { throw null; } set { } }
|
||||
public override System.Net.IWebProxy Proxy { get { throw null; } set { } }
|
||||
public override int Timeout { get { throw null; } set { } }
|
||||
public override System.Uri RequestUri { get { throw null; } }
|
||||
public override bool UseDefaultCredentials { get { throw null; } set { } }
|
||||
public override void Abort() { throw null; }
|
||||
public override System.IAsyncResult BeginGetRequestStream(System.AsyncCallback callback, object state) { throw null; }
|
||||
public override System.IAsyncResult BeginGetResponse(System.AsyncCallback callback, object state) { throw null; }
|
||||
public override System.IO.Stream EndGetRequestStream(System.IAsyncResult asyncResult) { throw null; }
|
||||
public override System.Net.WebResponse EndGetResponse(System.IAsyncResult asyncResult) { throw null; }
|
||||
public override System.IO.Stream GetRequestStream() { throw null; }
|
||||
public override System.Net.WebResponse GetResponse() { throw null; }
|
||||
void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
|
||||
protected override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
|
||||
}
|
||||
public class FileWebResponse : WebResponse, System.Runtime.Serialization.ISerializable
|
||||
{
|
||||
internal FileWebResponse() { }
|
||||
[Obsolete("Serialization is obsoleted for this type. http://go.microsoft.com/fwlink/?linkid=14202")]
|
||||
protected FileWebResponse(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) : base(serializationInfo, streamingContext) { }
|
||||
public override long ContentLength { get { throw null; } }
|
||||
public override string ContentType { get { throw null; } }
|
||||
public override WebHeaderCollection Headers { get { throw null; } }
|
||||
public override bool SupportsHeaders { get { throw null; } }
|
||||
public override Uri ResponseUri { get { throw null; } }
|
||||
public override void Close() { throw null; }
|
||||
void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
|
||||
protected override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
|
||||
public override System.IO.Stream GetResponseStream() { throw null; }
|
||||
}
|
||||
public sealed class FtpWebRequest : WebRequest
|
||||
{
|
||||
internal FtpWebRequest() { }
|
||||
public System.Security.Cryptography.X509Certificates.X509CertificateCollection ClientCertificates { get { throw null; } set { } }
|
||||
public override string ConnectionGroupName { get { throw null; } set { } }
|
||||
public override long ContentLength { get { throw null; } set { } }
|
||||
public long ContentOffset { get { throw null; } set { } }
|
||||
public override string ContentType { get { throw null; } set { } }
|
||||
public override System.Net.ICredentials Credentials { get { throw null; } set { } }
|
||||
public override System.Net.WebHeaderCollection Headers { get { throw null; } set { } }
|
||||
public override string Method { get { throw null; } set { } }
|
||||
public override bool PreAuthenticate { get { throw null; } set { } }
|
||||
public override System.Net.IWebProxy Proxy { get { throw null; } set { } }
|
||||
public string RenameTo { get { throw null; } set { } }
|
||||
public override int Timeout { get { throw null; } set { } }
|
||||
public bool EnableSsl { get { throw null; } set { } }
|
||||
public bool UsePassive { get { throw null; } set { } }
|
||||
public bool UseBinary { get { throw null; } set { } }
|
||||
public bool KeepAlive { get { throw null; } set { } }
|
||||
public int ReadWriteTimeout { get { throw null; } set { } }
|
||||
public System.Net.ServicePoint ServicePoint { get { throw null; } }
|
||||
public static new System.Net.Cache.RequestCachePolicy DefaultCachePolicy { get { throw null; } set { } }
|
||||
public override System.Uri RequestUri { get { throw null; } }
|
||||
public override bool UseDefaultCredentials { get { throw null; } set { } }
|
||||
public override void Abort() { throw null; }
|
||||
public override System.IAsyncResult BeginGetRequestStream(System.AsyncCallback callback, object state) { throw null; }
|
||||
public override System.IAsyncResult BeginGetResponse(System.AsyncCallback callback, object state) { throw null; }
|
||||
public override System.IO.Stream EndGetRequestStream(System.IAsyncResult asyncResult) { throw null; }
|
||||
public override System.Net.WebResponse EndGetResponse(System.IAsyncResult asyncResult) { throw null; }
|
||||
public override System.IO.Stream GetRequestStream() { throw null; }
|
||||
public override System.Net.WebResponse GetResponse() { throw null; }
|
||||
}
|
||||
public class FtpWebResponse : WebResponse, IDisposable
|
||||
{
|
||||
internal FtpWebResponse() { }
|
||||
public override long ContentLength { get { throw null; } }
|
||||
public override string ContentType { get { throw null; } }
|
||||
public override WebHeaderCollection Headers { get { throw null; } }
|
||||
public override bool SupportsHeaders { get { throw null; } }
|
||||
public override Uri ResponseUri { get { throw null; } }
|
||||
public override void Close() { throw null; }
|
||||
public override System.IO.Stream GetResponseStream() { throw null; }
|
||||
public string BannerMessage { get { throw null; } }
|
||||
public string ExitMessage { get { throw null; } }
|
||||
public string WelcomeMessage { get { throw null; } }
|
||||
public FtpStatusCode StatusCode { get { throw null; } }
|
||||
public string StatusDescription { get { throw null; } }
|
||||
public DateTime LastModified { get { throw null; } }
|
||||
}
|
||||
public partial class HttpWebRequest : System.Net.WebRequest, System.Runtime.Serialization.ISerializable
|
||||
{
|
||||
internal HttpWebRequest() { }
|
||||
[System.ObsoleteAttribute("Serialization is obsoleted for this type. http://go.microsoft.com/fwlink/?linkid=14202")]
|
||||
protected HttpWebRequest(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
|
||||
public string Accept { get { throw null; } set { } }
|
||||
public virtual bool AllowReadStreamBuffering { get { throw null; } set { } }
|
||||
public override string ContentType { get { throw null; } set { } }
|
||||
public int ContinueTimeout { get { throw null; } set { } }
|
||||
public virtual System.Net.CookieContainer CookieContainer { get { throw null; } set { } }
|
||||
public override System.Net.ICredentials Credentials { get { throw null; } set { } }
|
||||
public virtual bool HaveResponse { get { throw null; } }
|
||||
public override System.Net.WebHeaderCollection Headers { get { throw null; } set { } }
|
||||
public override string Method { get { throw null; } set { } }
|
||||
public override System.Uri RequestUri { get { throw null; } }
|
||||
public virtual bool SupportsCookieContainer { get { throw null; } }
|
||||
public override bool UseDefaultCredentials { get { throw null; } set { } }
|
||||
public override void Abort() { }
|
||||
public override System.IAsyncResult BeginGetRequestStream(System.AsyncCallback callback, object state) { throw null; }
|
||||
public override System.IAsyncResult BeginGetResponse(System.AsyncCallback callback, object state) { throw null; }
|
||||
public override System.IO.Stream EndGetRequestStream(System.IAsyncResult asyncResult) { throw null; }
|
||||
public System.IO.Stream EndGetRequestStream(System.IAsyncResult asyncResult, out System.Net.TransportContext context) { throw null; }
|
||||
public override System.Net.WebResponse EndGetResponse(System.IAsyncResult asyncResult) { throw null; }
|
||||
public override System.Net.WebResponse GetResponse() { throw null; }
|
||||
public virtual bool AllowWriteStreamBuffering { get { throw null; } set { } }
|
||||
public virtual bool AllowAutoRedirect { get { throw null; } set { } }
|
||||
public Uri Address { get { throw null; } }
|
||||
public DecompressionMethods AutomaticDecompression { get { throw null; } set { } }
|
||||
public DateTime Date { get { throw null; } set { } }
|
||||
public static int DefaultMaximumResponseHeadersLength { get { throw null; } set { } }
|
||||
public static int DefaultMaximumErrorResponseLength { get { throw null; } set { } }
|
||||
public System.Security.Cryptography.X509Certificates.X509CertificateCollection ClientCertificates { get { throw null; } set { } }
|
||||
public string Expect { get { throw null; } set { } }
|
||||
public DateTime IfModifiedSince { get { throw null; } set { } }
|
||||
public bool KeepAlive { get { throw null; } set { } }
|
||||
public int MaximumAutomaticRedirections { get { throw null; } set { } }
|
||||
public int MaximumResponseHeadersLength { get { throw null; } set { } }
|
||||
public string MediaType { get { throw null; } set { } }
|
||||
public System.IO.Stream GetRequestStream(out TransportContext context) { throw null; }
|
||||
public bool Pipelined { get { throw null; } set { } }
|
||||
public Version ProtocolVersion { get { throw null; } set { } }
|
||||
public int ReadWriteTimeout { get { throw null; } set { } }
|
||||
public string Referer { get { throw null; } set { } }
|
||||
public bool SendChunked { get { throw null; } set { } }
|
||||
public ServicePoint ServicePoint { get { throw null; } }
|
||||
public string TransferEncoding { get { throw null; } set { } }
|
||||
public string UserAgent { get { throw null; } set { } }
|
||||
public bool UnsafeAuthenticatedConnectionSharing { get { throw null; } set { } }
|
||||
public override System.IO.Stream GetRequestStream() { throw null; }
|
||||
public void AddRange(int range) { }
|
||||
public void AddRange(int from,int to) { }
|
||||
public void AddRange(long range) { }
|
||||
public void AddRange(long from,long to) { }
|
||||
public void AddRange(string rangeSpecifier, int range) { }
|
||||
public void AddRange(string rangeSpecifier, int from,int to) { }
|
||||
public void AddRange(string rangeSpecifier, long range) { }
|
||||
public void AddRange(string rangeSpecifier, long from,long to) { }
|
||||
public string Host { get { throw null; } set { } }
|
||||
public override string ConnectionGroupName { get { throw null; } set { } }
|
||||
public System.Net.Security.RemoteCertificateValidationCallback ServerCertificateValidationCallback { get; set; }
|
||||
public HttpContinueDelegate ContinueDelegate { get { throw null; } set { } }
|
||||
public string Connection { get { throw null; } set { } }
|
||||
public override System.Net.IWebProxy Proxy { get { throw null; } set { } }
|
||||
public static new System.Net.Cache.RequestCachePolicy DefaultCachePolicy { get { throw null; } set { } }
|
||||
public override bool PreAuthenticate { get { throw null; } set { } }
|
||||
public override int Timeout { get { throw null; } set { } }
|
||||
public override long ContentLength { get { throw null; } set { } }
|
||||
#pragma warning disable 0809 // Obsolete member overrides non-obsolete member
|
||||
[ObsoleteAttribute("Serialization is obsoleted for this type. http://go.microsoft.com/fwlink/?linkid=14202")]
|
||||
void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { throw null; }
|
||||
[ObsoleteAttribute("Serialization is obsoleted for this type. http://go.microsoft.com/fwlink/?linkid=14202")]
|
||||
protected override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { throw null; }
|
||||
#pragma warning restore 0809
|
||||
}
|
||||
public partial class HttpWebResponse : System.Net.WebResponse, System.Runtime.Serialization.ISerializable
|
||||
{
|
||||
public HttpWebResponse() { }
|
||||
[System.ObsoleteAttribute("Serialization is obsoleted for this type. http://go.microsoft.com/fwlink/?linkid=14202")]
|
||||
protected HttpWebResponse(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
|
||||
public override long ContentLength { get { throw null; } }
|
||||
public override string ContentType { get { throw null; } }
|
||||
public virtual System.Net.CookieCollection Cookies { get { throw null; } set { } }
|
||||
public override System.Net.WebHeaderCollection Headers { get { throw null; } }
|
||||
public virtual string Method { get { throw null; } }
|
||||
public override System.Uri ResponseUri { get { throw null; } }
|
||||
public virtual System.Net.HttpStatusCode StatusCode { get { throw null; } }
|
||||
public virtual string StatusDescription { get { throw null; } }
|
||||
public override bool SupportsHeaders { get { throw null; } }
|
||||
protected override void Dispose(bool disposing) { }
|
||||
public override System.IO.Stream GetResponseStream() { throw null; }
|
||||
public string GetResponseHeader(string headerName) { throw null; }
|
||||
public Version ProtocolVersion { get { throw null; } }
|
||||
public DateTime LastModified { get { throw null; } }
|
||||
public String ContentEncoding { get { throw null; } }
|
||||
public string CharacterSet { get { throw null; } }
|
||||
public string Server { get { throw null; } }
|
||||
public override void Close() { throw null; }
|
||||
public override bool IsMutuallyAuthenticated { get { throw null; } }
|
||||
#pragma warning disable 0809 // Obsolete member overrides non-obsolete member
|
||||
[ObsoleteAttribute("Serialization is obsoleted for this type. http://go.microsoft.com/fwlink/?linkid=14202")]
|
||||
void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { throw null; }
|
||||
[ObsoleteAttribute("Serialization is obsoleted for this type. http://go.microsoft.com/fwlink/?linkid=14202")]
|
||||
protected override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { throw null; }
|
||||
#pragma warning restore 0809
|
||||
}
|
||||
public interface IAuthenticationModule
|
||||
{
|
||||
System.Net.Authorization Authenticate(string challenge, System.Net.WebRequest request, System.Net.ICredentials credentials);
|
||||
System.Net.Authorization PreAuthenticate(System.Net.WebRequest request, System.Net.ICredentials credentials);
|
||||
bool CanPreAuthenticate { get; }
|
||||
string AuthenticationType { get; }
|
||||
}
|
||||
public interface ICredentialPolicy
|
||||
{
|
||||
bool ShouldSendCredential(System.Uri challengeUri, System.Net.WebRequest request, System.Net.NetworkCredential credential, System.Net.IAuthenticationModule authenticationModule);
|
||||
}
|
||||
public partial interface IWebRequestCreate
|
||||
{
|
||||
System.Net.WebRequest Create(System.Uri uri);
|
||||
}
|
||||
public partial class ProtocolViolationException : System.InvalidOperationException, System.Runtime.Serialization.ISerializable
|
||||
{
|
||||
public ProtocolViolationException() { }
|
||||
public ProtocolViolationException(string message) { }
|
||||
protected ProtocolViolationException(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 override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
|
||||
}
|
||||
public partial class WebException : System.InvalidOperationException , System.Runtime.Serialization.ISerializable
|
||||
{
|
||||
public WebException() { }
|
||||
public WebException(string message) { }
|
||||
public WebException(string message, System.Exception innerException) { }
|
||||
public WebException(string message, System.Exception innerException, System.Net.WebExceptionStatus status, System.Net.WebResponse response) { }
|
||||
public WebException(string message, System.Net.WebExceptionStatus status) { }
|
||||
public System.Net.WebResponse Response { get { throw null; } }
|
||||
public System.Net.WebExceptionStatus Status { get { throw null; } }
|
||||
protected WebException(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 enum WebExceptionStatus
|
||||
{
|
||||
CacheEntryNotFound = 18,
|
||||
ConnectFailure = 2,
|
||||
ConnectionClosed = 8,
|
||||
KeepAliveFailure = 12,
|
||||
MessageLengthLimitExceeded = 17,
|
||||
NameResolutionFailure = 1,
|
||||
Pending = 13,
|
||||
PipelineFailure = 5,
|
||||
ProtocolError = 7,
|
||||
ProxyNameResolutionFailure = 15,
|
||||
ReceiveFailure = 3,
|
||||
RequestCanceled = 6,
|
||||
RequestProhibitedByCachePolicy = 19,
|
||||
RequestProhibitedByProxy = 20,
|
||||
SecureChannelFailure = 10,
|
||||
SendFailure = 4,
|
||||
ServerProtocolViolation = 11,
|
||||
Success = 0,
|
||||
Timeout = 14,
|
||||
TrustFailure = 9,
|
||||
UnknownError = 16
|
||||
}
|
||||
public abstract partial class WebRequest : System.MarshalByRefObject, System.Runtime.Serialization.ISerializable
|
||||
{
|
||||
protected WebRequest() { }
|
||||
protected WebRequest(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
|
||||
public System.Net.Security.AuthenticationLevel AuthenticationLevel { get { throw null; } set { } }
|
||||
public virtual long ContentLength { get { throw null; } set { } }
|
||||
public virtual string ContentType { get { throw null; } set { } }
|
||||
public virtual System.Net.Cache.RequestCachePolicy CachePolicy { get { throw null; } set { } }
|
||||
public virtual string ConnectionGroupName { get { throw null; } set { } }
|
||||
public virtual System.Net.ICredentials Credentials { get { throw null; } set { } }
|
||||
public static System.Net.Cache.RequestCachePolicy DefaultCachePolicy { get { throw null; } set { } }
|
||||
public static System.Net.IWebProxy DefaultWebProxy { get { throw null; } set { } }
|
||||
public virtual System.Net.WebHeaderCollection Headers { get { throw null; } set { } }
|
||||
public System.Security.Principal.TokenImpersonationLevel ImpersonationLevel { get { throw null; } set { } }
|
||||
public virtual string Method { get { throw null; } set { } }
|
||||
public virtual bool PreAuthenticate { get { throw null; } set { } }
|
||||
public virtual System.Net.IWebProxy Proxy { get { throw null; } set { } }
|
||||
public virtual System.Uri RequestUri { get { throw null; } }
|
||||
public virtual int Timeout { get { throw null; } set { } }
|
||||
public virtual bool UseDefaultCredentials { get { throw null; } set { } }
|
||||
public virtual void Abort() { throw null; }
|
||||
public virtual System.IAsyncResult BeginGetRequestStream(System.AsyncCallback callback, object state) { throw null; }
|
||||
public virtual System.IAsyncResult BeginGetResponse(System.AsyncCallback callback, object state) { throw null; }
|
||||
public static System.Net.WebRequest Create(string requestUriString) { throw null; }
|
||||
public static System.Net.WebRequest Create(System.Uri requestUri) { throw null; }
|
||||
public static System.Net.WebRequest CreateDefault(Uri requestUri) { throw null; }
|
||||
public static System.Net.HttpWebRequest CreateHttp(string requestUriString) { throw null; }
|
||||
public static System.Net.HttpWebRequest CreateHttp(System.Uri requestUri) { throw null; }
|
||||
public virtual System.IO.Stream EndGetRequestStream(System.IAsyncResult asyncResult) { throw null; }
|
||||
public virtual System.Net.WebResponse EndGetResponse(System.IAsyncResult asyncResult) { throw null; }
|
||||
void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { throw null; }
|
||||
protected virtual void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { throw null; }
|
||||
public virtual System.IO.Stream GetRequestStream() { throw null; }
|
||||
public virtual System.Threading.Tasks.Task<System.IO.Stream> GetRequestStreamAsync() { throw null; }
|
||||
public virtual System.Net.WebResponse GetResponse() { throw null; }
|
||||
public virtual System.Threading.Tasks.Task<System.Net.WebResponse> GetResponseAsync() { throw null; }
|
||||
public static System.Net.IWebProxy GetSystemWebProxy() { throw null; }
|
||||
public static bool RegisterPrefix(string prefix, System.Net.IWebRequestCreate creator) { throw null; }
|
||||
}
|
||||
public static class WebRequestMethods
|
||||
{
|
||||
public static class Ftp
|
||||
{
|
||||
public const string DownloadFile = "RETR";
|
||||
public const string ListDirectory = "NLST";
|
||||
public const string UploadFile = "STOR";
|
||||
public const string DeleteFile = "DELE";
|
||||
public const string AppendFile = "APPE";
|
||||
public const string GetFileSize = "SIZE";
|
||||
public const string UploadFileWithUniqueName = "STOU";
|
||||
public const string MakeDirectory = "MKD";
|
||||
public const string RemoveDirectory = "RMD";
|
||||
public const string ListDirectoryDetails = "LIST";
|
||||
public const string GetDateTimestamp = "MDTM";
|
||||
public const string PrintWorkingDirectory = "PWD";
|
||||
public const string Rename = "RENAME";
|
||||
}
|
||||
public static class Http
|
||||
{
|
||||
public const string Get = "GET";
|
||||
public const string Connect = "CONNECT";
|
||||
public const string Head = "HEAD";
|
||||
public const string Put = "PUT";
|
||||
public const string Post = "POST";
|
||||
public const string MkCol = "MKCOL";
|
||||
}
|
||||
public static class File
|
||||
{
|
||||
public const string DownloadFile = "GET";
|
||||
public const string UploadFile = "PUT";
|
||||
}
|
||||
}
|
||||
public abstract partial class WebResponse : System.MarshalByRefObject, System.Runtime.Serialization.ISerializable, System.IDisposable
|
||||
{
|
||||
protected WebResponse() { }
|
||||
protected WebResponse(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
|
||||
public virtual long ContentLength { get { throw null; } set { } }
|
||||
public virtual string ContentType { get { throw null; } set { } }
|
||||
public virtual System.Net.WebHeaderCollection Headers { get { throw null; } }
|
||||
public virtual bool IsFromCache { get { throw null; } }
|
||||
public virtual bool IsMutuallyAuthenticated { get { throw null; } }
|
||||
public virtual System.Uri ResponseUri { get { throw null; } }
|
||||
public virtual bool SupportsHeaders { get { throw null; } }
|
||||
public virtual void Close() { }
|
||||
public void Dispose() { }
|
||||
protected virtual void Dispose(bool disposing) { }
|
||||
public virtual System.IO.Stream GetResponseStream() { throw null; }
|
||||
protected virtual 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) { }
|
||||
}
|
||||
[ObsoleteAttribute("This class has been deprecated. Please use WebRequest.DefaultWebProxy instead to access and set the global default proxy. Use 'null' instead of GetEmptyWebProxy. http://go.microsoft.com/fwlink/?linkid=14202")]
|
||||
public class GlobalProxySelection
|
||||
{
|
||||
public static IWebProxy Select { get { throw null; } set { } }
|
||||
public static IWebProxy GetEmptyWebProxy() { throw null; }
|
||||
}
|
||||
public enum FtpStatusCode
|
||||
{
|
||||
Undefined = 0,
|
||||
RestartMarker = 110,
|
||||
ServiceTemporarilyNotAvailable = 120,
|
||||
DataAlreadyOpen = 125,
|
||||
OpeningData = 150,
|
||||
CommandOK = 200,
|
||||
CommandExtraneous = 202,
|
||||
DirectoryStatus = 212,
|
||||
FileStatus = 213,
|
||||
SystemType = 215,
|
||||
SendUserCommand = 220,
|
||||
ClosingControl = 221,
|
||||
ClosingData = 226,
|
||||
EnteringPassive = 227,
|
||||
LoggedInProceed = 230,
|
||||
ServerWantsSecureSession = 234,
|
||||
FileActionOK = 250,
|
||||
PathnameCreated = 257,
|
||||
SendPasswordCommand = 331,
|
||||
NeedLoginAccount = 332,
|
||||
FileCommandPending = 350,
|
||||
ServiceNotAvailable = 421,
|
||||
CantOpenData = 425,
|
||||
ConnectionClosed = 426,
|
||||
ActionNotTakenFileUnavailableOrBusy = 450,
|
||||
ActionAbortedLocalProcessingError = 451,
|
||||
ActionNotTakenInsufficientSpace = 452,
|
||||
CommandSyntaxError = 500,
|
||||
ArgumentSyntaxError = 501,
|
||||
CommandNotImplemented = 502,
|
||||
BadCommandSequence = 503,
|
||||
NotLoggedIn = 530,
|
||||
AccountNeeded = 532,
|
||||
ActionNotTakenFileUnavailable = 550,
|
||||
ActionAbortedUnknownPageType = 551,
|
||||
FileActionAborted = 552,
|
||||
ActionNotTakenFilenameNotAllowed = 553
|
||||
}
|
||||
}
|
||||
namespace System.Net.Cache
|
||||
{
|
||||
public enum HttpCacheAgeControl
|
||||
{
|
||||
None = 0x0,
|
||||
MinFresh = 0x1,
|
||||
MaxAge = 0x2,
|
||||
MaxStale = 0x4,
|
||||
MaxAgeAndMinFresh = 0x3,
|
||||
MaxAgeAndMaxStale = 0x6
|
||||
}
|
||||
public enum HttpRequestCacheLevel
|
||||
{
|
||||
Default = 0,
|
||||
BypassCache = 1,
|
||||
CacheOnly = 2,
|
||||
CacheIfAvailable = 3,
|
||||
Revalidate = 4,
|
||||
Reload = 5,
|
||||
NoCacheNoStore = 6,
|
||||
CacheOrNextCacheOnly = 7,
|
||||
Refresh = 8
|
||||
}
|
||||
public class HttpRequestCachePolicy : RequestCachePolicy
|
||||
{
|
||||
public HttpRequestCachePolicy() { }
|
||||
public HttpRequestCachePolicy(System.DateTime cacheSyncDate) { }
|
||||
public HttpRequestCachePolicy(System.Net.Cache.HttpRequestCacheLevel level) { }
|
||||
public HttpRequestCachePolicy(System.Net.Cache.HttpCacheAgeControl cacheAgeControl, System.TimeSpan ageOrFreshOrStale) { }
|
||||
public HttpRequestCachePolicy(System.Net.Cache.HttpCacheAgeControl cacheAgeControl, System.TimeSpan maxAge, System.TimeSpan freshOrStale) { }
|
||||
public HttpRequestCachePolicy(System.Net.Cache.HttpCacheAgeControl cacheAgeControl, System.TimeSpan maxAge, System.TimeSpan freshOrStale, System.DateTime cacheSyncDate) { }
|
||||
public new System.Net.Cache.HttpRequestCacheLevel Level { get { throw null; } }
|
||||
public System.DateTime CacheSyncDate { get { throw null; } }
|
||||
public System.TimeSpan MaxAge { get { throw null; } }
|
||||
public System.TimeSpan MinFresh { get { throw null; } }
|
||||
public System.TimeSpan MaxStale { get { throw null; } }
|
||||
public override string ToString() { throw null; }
|
||||
}
|
||||
}
|
25
external/corefx/src/System.Net.Requests/ref/System.Net.Requests.csproj
vendored
Normal file
25
external/corefx/src/System.Net.Requests/ref/System.Net.Requests.csproj
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?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.Requests.cs" />
|
||||
<Compile Include="System.Net.Requests.Manual.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\System.Collections.Specialized\ref\System.Collections.Specialized.csproj" />
|
||||
<ProjectReference Include="..\..\System.IO\ref\System.IO.csproj" />
|
||||
<ProjectReference Include="..\..\System.Net.Primitives\ref\System.Net.Primitives.csproj" />
|
||||
<ProjectReference Include="..\..\System.Net.Security\ref\System.Net.Security.csproj" />
|
||||
<ProjectReference Include="..\..\System.Net.ServicePoint\ref\System.Net.ServicePoint.csproj" />
|
||||
<ProjectReference Include="..\..\System.Net.WebHeaderCollection\ref\System.Net.WebHeaderCollection.csproj" />
|
||||
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
|
||||
<ProjectReference Include="..\..\System.Security.Cryptography.X509Certificates\ref\System.Security.Cryptography.X509Certificates.csproj" />
|
||||
<ProjectReference Include="..\..\System.Security.Principal\ref\System.Security.Principal.csproj" />
|
||||
<ProjectReference Include="..\..\System.Threading.Tasks\ref\System.Threading.Tasks.csproj" />
|
||||
</ItemGroup>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||
</Project>
|
10
external/corefx/src/System.Net.Requests/src/Configurations.props
vendored
Normal file
10
external/corefx/src/System.Net.Requests/src/Configurations.props
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<BuildConfigurations>
|
||||
netcoreapp-Unix;
|
||||
netcoreapp-Windows_NT;
|
||||
net463-Windows_NT;
|
||||
</BuildConfigurations>
|
||||
</PropertyGroup>
|
||||
</Project>
|
12
external/corefx/src/System.Net.Requests/src/FxCopBaseline.cs
vendored
Normal file
12
external/corefx/src/System.Net.Requests/src/FxCopBaseline.cs
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA2237", Scope = "type", Target = "System.Net.FtpWebRequest")]
|
||||
[assembly: SuppressMessage("Microsoft.Design", "CA2237", Scope = "type", Target = "System.Net.FtpWebResponse")]
|
||||
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Net.FileWebRequest.#CheckAndMarkAsyncGetRequestStreamPending()")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Net.FileWebRequest.#CheckAndMarkAsyncGetResponsePending()")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Net.FileWebRequest.#CreateResponse():System.Net.WebResponse")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Net.FileWebRequest.#UnblockReader()")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Net.CommandStream.#Abort(System.Exception)")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Net.CommandStream.#ContinueCommandPipeline():System.IO.Stream")]
|
||||
[assembly: SuppressMessage("Microsoft.Reliability", "CA2002:DoNotLockOnObjectsWithWeakIdentity", Scope = "member", Target = "System.Net.FtpWebResponse.#get_Headers():System.Net.WebHeaderCollection")]
|
342
external/corefx/src/System.Net.Requests/src/Resources/Strings.resx
vendored
Normal file
342
external/corefx/src/System.Net.Requests/src/Resources/Strings.resx
vendored
Normal file
@@ -0,0 +1,342 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="NotSupported" xml:space="preserve">
|
||||
<value>This operation is not supported.</value>
|
||||
</data>
|
||||
<data name="net_unknown_prefix" xml:space="preserve">
|
||||
<value>The URI prefix is not recognized.</value>
|
||||
</data>
|
||||
<data name="net_headers_toolong" xml:space="preserve">
|
||||
<value>Header values cannot be longer than {0} characters.</value>
|
||||
</data>
|
||||
<data name="net_emptystringcall" xml:space="preserve">
|
||||
<value>The parameter '{0}' cannot be an empty string.</value>
|
||||
</data>
|
||||
<data name="net_headers_req" xml:space="preserve">
|
||||
<value> This collection holds response headers and cannot contain the specified request header.</value>
|
||||
</data>
|
||||
<data name="net_reqsubmitted" xml:space="preserve">
|
||||
<value>This operation cannot be performed after the request has been submitted.</value>
|
||||
</data>
|
||||
<data name="net_io_timeout_use_ge_zero" xml:space="preserve">
|
||||
<value>Timeout can be only be set to 'System.Threading.Timeout.Infinite' or a value >= 0.</value>
|
||||
</data>
|
||||
<data name="net_writestarted" xml:space="preserve">
|
||||
<value>This property cannot be set after writing has started.</value>
|
||||
</data>
|
||||
<data name="net_badmethod" xml:space="preserve">
|
||||
<value>Cannot set null or blank methods on request.</value>
|
||||
</data>
|
||||
<data name="net_io_invalidasyncresult" xml:space="preserve">
|
||||
<value>The IAsyncResult object was not returned from the corresponding asynchronous method on this class.</value>
|
||||
</data>
|
||||
<data name="net_io_invalidendcall" xml:space="preserve">
|
||||
<value>{0} can only be called once for each asynchronous operation.</value>
|
||||
</data>
|
||||
<data name="net_servererror" xml:space="preserve">
|
||||
<value>The remote server returned an error: ({0}) {1}.</value>
|
||||
</data>
|
||||
<data name="net_reqaborted" xml:space="preserve">
|
||||
<value>The request was aborted: The request was canceled.</value>
|
||||
</data>
|
||||
<data name="net_MethodNotImplementedException" xml:space="preserve">
|
||||
<value>This method is not implemented by this class.</value>
|
||||
</data>
|
||||
<data name="net_PropertyNotImplementedException" xml:space="preserve">
|
||||
<value>This property is not implemented by this class.</value>
|
||||
</data>
|
||||
<data name="net_nouploadonget" xml:space="preserve">
|
||||
<value>Cannot send a content-body with this verb-type.</value>
|
||||
</data>
|
||||
<data name="net_repcall" xml:space="preserve">
|
||||
<value>Cannot re-call BeginGetRequestStream/BeginGetResponse while a previous call is still in progress.</value>
|
||||
</data>
|
||||
<data name="net_invalid_enum" xml:space="preserve">
|
||||
<value>The specified value is not valid in the '{0}' enumeration.</value>
|
||||
</data>
|
||||
<data name="net_securityprotocolnotsupported" xml:space="preserve">
|
||||
<value>The requested security protocol is not supported.</value>
|
||||
</data>
|
||||
<data name="net_requestaborted" xml:space="preserve">
|
||||
<value>The request was aborted: {0}.</value>
|
||||
</data>
|
||||
<data name="net_clsmall" xml:space="preserve">
|
||||
<value>The Content-Length value must be greater than or equal to zero.</value>
|
||||
</data>
|
||||
<data name="net_webstatus_Timeout" xml:space="preserve">
|
||||
<value>The operation has timed out.</value>
|
||||
</data>
|
||||
<data name="net_proxyschemenotsupported" xml:space="preserve">
|
||||
<value>The ServicePointManager does not support proxies with the {0} scheme.</value>
|
||||
</data>
|
||||
<data name="net_baddate" xml:space="preserve">
|
||||
<value>The value of the date string in the header is invalid.</value>
|
||||
</data>
|
||||
<data name="net_connarg" xml:space="preserve">
|
||||
<value>Keep-Alive and Close may not be set using this property.</value>
|
||||
</data>
|
||||
<data name="net_fromto" xml:space="preserve">
|
||||
<value>The From parameter cannot be less than To.</value>
|
||||
</data>
|
||||
<data name="net_needchunked" xml:space="preserve">
|
||||
<value>TransferEncoding requires the SendChunked property to be set to true.</value>
|
||||
</data>
|
||||
<data name="net_no100" xml:space="preserve">
|
||||
<value>100-Continue may not be set using this property.</value>
|
||||
</data>
|
||||
<data name="net_nochunked" xml:space="preserve">
|
||||
<value>Chunked encoding must be set via the SendChunked property.</value>
|
||||
</data>
|
||||
<data name="net_nottoken" xml:space="preserve">
|
||||
<value>The supplied string is not a valid HTTP token.</value>
|
||||
</data>
|
||||
<data name="net_rangetoosmall" xml:space="preserve">
|
||||
<value>The From or To parameter cannot be less than 0.</value>
|
||||
</data>
|
||||
<data name="net_rangetype" xml:space="preserve">
|
||||
<value>A different range specifier has already been added to this request.</value>
|
||||
</data>
|
||||
<data name="net_toosmall" xml:space="preserve">
|
||||
<value>The specified value must be greater than 0.</value>
|
||||
</data>
|
||||
<data name="net_wrongversion" xml:space="preserve">
|
||||
<value>Only HTTP/1.0 and HTTP/1.1 version requests are currently supported.</value>
|
||||
</data>
|
||||
<data name="net_WebHeaderInvalidControlChars" xml:space="preserve">
|
||||
<value>Specified value has invalid Control characters.</value>
|
||||
</data>
|
||||
<data name="net_WebHeaderInvalidCRLFChars" xml:space="preserve">
|
||||
<value>Specified value has invalid CRLF characters.</value>
|
||||
</data>
|
||||
<data name="net_WebHeaderInvalidHeaderChars" xml:space="preserve">
|
||||
<value>Specified value has invalid HTTP Header characters.</value>
|
||||
</data>
|
||||
<data name="net_WebHeaderInvalidNonAsciiChars" xml:space="preserve">
|
||||
<value>Specified value has invalid non-ASCII characters.</value>
|
||||
</data>
|
||||
<data name="net_timeout" xml:space="preserve">
|
||||
<value>The operation has timed out.</value>
|
||||
</data>
|
||||
<data name="net_completed_result" xml:space="preserve">
|
||||
<value>This operation cannot be performed on a completed asynchronous result object.</value>
|
||||
</data>
|
||||
<data name="net_PropertyNotSupportedException" xml:space="preserve">
|
||||
<value>This property is not supported by this class.</value>
|
||||
</data>
|
||||
<data name="net_InvalidStatusCode" xml:space="preserve">
|
||||
<value>The server returned a status code outside the valid range of 100-599.</value>
|
||||
</data>
|
||||
<data name="net_io_timeout_use_gt_zero" xml:space="preserve">
|
||||
<value>Timeout can be only be set to 'System.Threading.Timeout.Infinite' or a value > 0.</value>
|
||||
</data>
|
||||
<data name="net_ftp_servererror" xml:space="preserve">
|
||||
<value>The remote server returned an error: {0}.</value>
|
||||
</data>
|
||||
<data name="net_ftp_active_address_different" xml:space="preserve">
|
||||
<value>The data connection was made from an address that is different than the address to which the FTP connection was made.</value>
|
||||
</data>
|
||||
<data name="net_ftp_invalid_method_name" xml:space="preserve">
|
||||
<value>FTP Method names cannot be null or empty.</value>
|
||||
</data>
|
||||
<data name="net_ftp_invalid_renameto" xml:space="preserve">
|
||||
<value>The RenameTo filename cannot be null or empty.</value>
|
||||
</data>
|
||||
<data name="net_ftp_invalid_response_filename" xml:space="preserve">
|
||||
<value>The server returned the filename ({0}) which is not valid.</value>
|
||||
</data>
|
||||
<data name="net_ftp_invalid_status_response" xml:space="preserve">
|
||||
<value>The status response ({0}) is not expected in response to '{1}' command.</value>
|
||||
</data>
|
||||
<data name="net_ftp_invalid_uri" xml:space="preserve">
|
||||
<value>The requested URI is invalid for this FTP command.</value>
|
||||
</data>
|
||||
<data name="net_ftp_no_defaultcreds" xml:space="preserve">
|
||||
<value>Default credentials are not supported on an FTP request.</value>
|
||||
</data>
|
||||
<data name="net_ftp_response_invalid_format" xml:space="preserve">
|
||||
<value>The response string '{0}' has invalid format.</value>
|
||||
</data>
|
||||
<data name="net_ftp_server_failed_passive" xml:space="preserve">
|
||||
<value>The server failed the passive mode request with status response ({0}).</value>
|
||||
</data>
|
||||
<data name="net_ftp_unsupported_method" xml:space="preserve">
|
||||
<value>This method is not supported.</value>
|
||||
</data>
|
||||
<data name="net_ftp_protocolerror" xml:space="preserve">
|
||||
<value>The underlying connection was closed: The server committed a protocol violation</value>
|
||||
</data>
|
||||
<data name="net_ftp_receivefailure" xml:space="preserve">
|
||||
<value>The underlying connection was closed: An unexpected error occurred on a receive</value>
|
||||
</data>
|
||||
<data name="net_webstatus_NameResolutionFailure" xml:space="preserve">
|
||||
<value>The remote name could not be resolved</value>
|
||||
</data>
|
||||
<data name="net_webstatus_ConnectFailure" xml:space="preserve">
|
||||
<value>Unable to connect to the remote server</value>
|
||||
</data>
|
||||
<data name="net_ftpstatuscode_ServiceNotAvailable" xml:space="preserve">
|
||||
<value>Service not available, closing control connection.</value>
|
||||
</data>
|
||||
<data name="net_ftpstatuscode_CantOpenData" xml:space="preserve">
|
||||
<value>Can't open data connection</value>
|
||||
</data>
|
||||
<data name="net_ftpstatuscode_ConnectionClosed" xml:space="preserve">
|
||||
<value>Connection closed; transfer aborted</value>
|
||||
</data>
|
||||
<data name="net_ftpstatuscode_ActionNotTakenFileUnavailableOrBusy" xml:space="preserve">
|
||||
<value>File unavailable (e.g., file busy)</value>
|
||||
</data>
|
||||
<data name="net_ftpstatuscode_ActionAbortedLocalProcessingError" xml:space="preserve">
|
||||
<value>Local error in processing</value>
|
||||
</data>
|
||||
<data name="net_ftpstatuscode_ActionNotTakenInsufficientSpace" xml:space="preserve">
|
||||
<value>Insufficient storage space in system</value>
|
||||
</data>
|
||||
<data name="net_ftpstatuscode_CommandSyntaxError" xml:space="preserve">
|
||||
<value>Syntax error, command unrecognized</value>
|
||||
</data>
|
||||
<data name="net_ftpstatuscode_ArgumentSyntaxError" xml:space="preserve">
|
||||
<value>Syntax error in parameters or arguments</value>
|
||||
</data>
|
||||
<data name="net_ftpstatuscode_CommandNotImplemented" xml:space="preserve">
|
||||
<value>Command not implemented</value>
|
||||
</data>
|
||||
<data name="net_ftpstatuscode_BadCommandSequence" xml:space="preserve">
|
||||
<value>Bad sequence of commands</value>
|
||||
</data>
|
||||
<data name="net_ftpstatuscode_NotLoggedIn" xml:space="preserve">
|
||||
<value>Not logged in</value>
|
||||
</data>
|
||||
<data name="net_ftpstatuscode_AccountNeeded" xml:space="preserve">
|
||||
<value>Need account for storing files</value>
|
||||
</data>
|
||||
<data name="net_ftpstatuscode_ActionNotTakenFileUnavailable" xml:space="preserve">
|
||||
<value>File unavailable (e.g., file not found, no access)</value>
|
||||
</data>
|
||||
<data name="net_ftpstatuscode_ActionAbortedUnknownPageType" xml:space="preserve">
|
||||
<value>Page type unknown</value>
|
||||
</data>
|
||||
<data name="net_ftpstatuscode_FileActionAborted" xml:space="preserve">
|
||||
<value>Exceeded storage allocation (for current directory or data set)</value>
|
||||
</data>
|
||||
<data name="net_ftpstatuscode_ActionNotTakenFilenameNotAllowed" xml:space="preserve">
|
||||
<value>File name not allowed</value>
|
||||
</data>
|
||||
</root>
|
150
external/corefx/src/System.Net.Requests/src/System.Net.Requests.csproj
vendored
Normal file
150
external/corefx/src/System.Net.Requests/src/System.Net.Requests.csproj
vendored
Normal file
@@ -0,0 +1,150 @@
|
||||
<?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>
|
||||
<ProjectGuid>{5EE76DCC-9FD5-47FD-AB45-BD0F0857740F}</ProjectGuid>
|
||||
<RootNamespace>System.Net.Requests</RootNamespace>
|
||||
<AssemblyName>System.Net.Requests</AssemblyName>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<IsPartialFacadeAssembly Condition="'$(TargetGroup)' == 'net463'">true</IsPartialFacadeAssembly>
|
||||
<ResourcesSourceOutputDirectory Condition="'$(TargetGroup)' == 'net463'">None</ResourcesSourceOutputDirectory>
|
||||
</PropertyGroup>
|
||||
<!-- Help VS understand available configurations -->
|
||||
<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'" />
|
||||
<ItemGroup>
|
||||
<Compile Include="FxCopBaseline.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
|
||||
<Compile Include="System\Net\AuthenticationManager.cs" />
|
||||
<Compile Include="System\Net\Authorization.cs" />
|
||||
<Compile Include="System\Net\FileWebRequest.cs" />
|
||||
<Compile Include="System\Net\FileWebResponse.cs" />
|
||||
<Compile Include="System\Net\GlobalProxySelection.cs" />
|
||||
<Compile Include="System\Net\HttpRequestHeader.cs" />
|
||||
<Compile Include="System\Net\HttpWebRequest.cs" />
|
||||
<Compile Include="System\Net\HttpWebResponse.cs" />
|
||||
<Compile Include="System\Net\IAuthenticationModule.cs" />
|
||||
<Compile Include="System\Net\ICredentialPolicy.cs" />
|
||||
<Compile Include="System\Net\IWebRequestCreate.cs" />
|
||||
<Compile Include="System\Net\ProtocolViolationException.cs" />
|
||||
<Compile Include="System\Net\RequestStream.cs" />
|
||||
<Compile Include="System\Net\SystemWebProxy.cs" />
|
||||
<Compile Include="System\Net\TaskExtensions.cs" />
|
||||
<Compile Include="System\Net\WebException.cs" />
|
||||
<Compile Include="System\Net\WebExceptionStatus.cs" />
|
||||
<Compile Include="System\Net\WebHeaderCollection.cs" />
|
||||
<Compile Include="System\Net\WebRequest.cs" />
|
||||
<Compile Include="System\Net\WebRequestMethods.cs" />
|
||||
<Compile Include="System\Net\WebResponse.cs" />
|
||||
<Compile Include="System\Net\ExceptionHelper.cs" />
|
||||
<Compile Include="System\Net\FtpStatusCode.cs" />
|
||||
<Compile Include="System\Net\FtpWebRequest.cs" />
|
||||
<Compile Include="System\Net\FtpWebResponse.cs" />
|
||||
<Compile Include="System\Net\TriState.cs" />
|
||||
<Compile Include="System\Net\CommandStream.cs" />
|
||||
<Compile Include="System\Net\FtpControlStream.cs" />
|
||||
<Compile Include="System\Net\FtpDataStream.cs" />
|
||||
<Compile Include="System\Net\ICloseEx.cs" />
|
||||
<Compile Include="System\Net\NetRes.cs" />
|
||||
<Compile Include="System\Net\NetworkStreamWrapper.cs" />
|
||||
<Compile Include="System\Net\TimerThread.cs" />
|
||||
<Compile Include="System\Net\Cache\HttpCacheAgeControl.cs" />
|
||||
<Compile Include="System\Net\Cache\HttpRequestCacheLevel.cs" />
|
||||
<Compile Include="System\Net\Cache\HttpRequestCachePolicy.cs" />
|
||||
<Compile Include="System\Net\HttpDateParse.cs" />
|
||||
<Compile Include="System\Net\NetEventSource.Requests.cs" />
|
||||
<Compile Include="$(CommonPath)\System\Net\Http\HttpHandlerDefaults.cs">
|
||||
<Link>Common\System\Net\Http\HttpHandlerDefaults.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\System\Net\InternalException.cs">
|
||||
<Link>Common\System\Net\InternalException.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\Logging\DebugThreadTracking.cs">
|
||||
<Link>Common\System\Net\Logging\DebugThreadTracking.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\System\Net\HttpKnownHeaderNames.cs">
|
||||
<Link>Common\System\Net\HttpKnownHeaderNames.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\System\Net\HttpValidationHelpers.cs">
|
||||
<Link>Common\System\Net\HttpValidationHelpers.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\System\Net\LazyAsyncResult.cs">
|
||||
<Link>Common\System\Net\LazyAsyncResult.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\System\Net\ContextAwareResult.cs">
|
||||
<Link>Common\System\Net\ContextAwareResult.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\System\Net\ExceptionCheck.cs">
|
||||
<Link>Common\System\Net\ExceptionCheck.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\System\Net\TlsStream.cs">
|
||||
<Link>Common\System\Net\TlsStream.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\System\Net\SecurityProtocol.cs">
|
||||
<Link>Common\System\Net\SecurityProtocol.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\System\NotImplemented.cs">
|
||||
<Link>Common\System\NotImplemented.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\System\Threading\Tasks\TaskToApm.cs">
|
||||
<Link>Common\System\Threading\Tasks\TaskToApm.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(TargetsWindows)' == 'true' And '$(TargetGroup)' == 'netcoreapp'">
|
||||
<Compile Include="$(CommonPath)\Interop\Windows\wininet\Interop.wininet_errors.cs">
|
||||
<Link>Common\Interop\Windows\wininet\Interop.wininet_errors.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\System\Net\ContextAwareResult.Windows.cs">
|
||||
<Link>Common\System\Net\ContextAwareResult.Windows.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="System\Net\WebExceptionPal.Windows.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(TargetsUnix)' == 'true' ">
|
||||
<Compile Include="$(CommonPath)\Interop\Unix\System.Net.Http.Native\Interop.CURLcode.cs">
|
||||
<Link>Common\Interop\Unix\System.Net.Http.Native\Interop.CURLcode.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\System\Net\ContextAwareResult.Unix.cs">
|
||||
<Link>Common\System\Net\ContextAwareResult.Unix.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="System\Net\WebExceptionPal.Unix.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetGroup)' == 'net463'">
|
||||
<TargetingPackReference Include="mscorlib" />
|
||||
<TargetingPackReference Include="System" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.Win32.Primitives" />
|
||||
<Reference Include="System.Collections" />
|
||||
<Reference Include="System.Collections.NonGeneric" />
|
||||
<Reference Include="System.Collections.Specialized" />
|
||||
<Reference Include="System.Diagnostics.Debug" />
|
||||
<Reference Include="System.Diagnostics.Tools" />
|
||||
<Reference Include="System.Diagnostics.Tracing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Net.Primitives" />
|
||||
<Reference Include="System.Net.Security" />
|
||||
<Reference Include="System.Net.ServicePoint" />
|
||||
<Reference Include="System.Net.Sockets" />
|
||||
<Reference Include="System.Net.WebHeaderCollection" />
|
||||
<Reference Include="System.Resources.ResourceManager" />
|
||||
<Reference Include="System.Runtime" />
|
||||
<Reference Include="System.Runtime.Extensions" />
|
||||
<Reference Include="System.Runtime.InteropServices" />
|
||||
<Reference Include="System.Security.Claims" />
|
||||
<Reference Include="System.Security.Cryptography.X509Certificates" />
|
||||
<Reference Include="System.Security.Principal" />
|
||||
<Reference Include="System.Security.Principal.Windows" />
|
||||
<Reference Include="System.Threading" />
|
||||
<Reference Include="System.Threading.Tasks" />
|
||||
<Reference Include="System.Threading.Thread" />
|
||||
</ItemGroup>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||
</Project>
|
42
external/corefx/src/System.Net.Requests/src/System/Net/AuthenticationManager.cs
vendored
Normal file
42
external/corefx/src/System.Net.Requests/src/System/Net/AuthenticationManager.cs
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
// 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.Specialized;
|
||||
|
||||
namespace System.Net
|
||||
{
|
||||
public class AuthenticationManager
|
||||
{
|
||||
private AuthenticationManager() { }
|
||||
|
||||
public static ICredentialPolicy CredentialPolicy { get; set; }
|
||||
|
||||
public static StringDictionary CustomTargetNameDictionary { get; } = new StringDictionary();
|
||||
|
||||
public static Authorization Authenticate(string challenge, WebRequest request, ICredentials credentials)
|
||||
{
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
public static Authorization PreAuthenticate(WebRequest request, ICredentials credentials)
|
||||
{
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
public static void Register(IAuthenticationModule authenticationModule)
|
||||
{
|
||||
}
|
||||
|
||||
public static void Unregister(IAuthenticationModule authenticationModule)
|
||||
{
|
||||
}
|
||||
|
||||
public static void Unregister(string authenticationScheme)
|
||||
{
|
||||
}
|
||||
|
||||
public static IEnumerator RegisteredModules => Array.Empty<IAuthenticationModule>().GetEnumerator();
|
||||
}
|
||||
}
|
47
external/corefx/src/System.Net.Requests/src/System/Net/Authorization.cs
vendored
Normal file
47
external/corefx/src/System.Net.Requests/src/System/Net/Authorization.cs
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
// 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
|
||||
{
|
||||
public class Authorization
|
||||
{
|
||||
private string[] _protectionRealm;
|
||||
private bool _mutualAuth;
|
||||
|
||||
public Authorization(string token) :
|
||||
this(token, true) { }
|
||||
|
||||
public Authorization(string token, bool finished) :
|
||||
this(token, finished, null) { }
|
||||
|
||||
public Authorization(string token, bool finished, string connectionGroupId) :
|
||||
this(token, finished, connectionGroupId, false) { }
|
||||
|
||||
internal Authorization(string token, bool finished, string connectionGroupId, bool mutualAuth)
|
||||
{
|
||||
Message = string.IsNullOrEmpty(token) ? null : token;
|
||||
ConnectionGroupId = string.IsNullOrEmpty(connectionGroupId) ? null : connectionGroupId;
|
||||
Complete = finished;
|
||||
_mutualAuth = mutualAuth;
|
||||
}
|
||||
|
||||
public string Message { get; }
|
||||
|
||||
public string ConnectionGroupId { get; }
|
||||
|
||||
public bool Complete { get; internal set; }
|
||||
|
||||
public string[] ProtectionRealm
|
||||
{
|
||||
get { return _protectionRealm; }
|
||||
set { _protectionRealm = value != null && value.Length != 0 ? value : null; }
|
||||
}
|
||||
|
||||
public bool MutuallyAuthenticated
|
||||
{
|
||||
get { return Complete && _mutualAuth; }
|
||||
set { _mutualAuth = value; }
|
||||
}
|
||||
}
|
||||
}
|
16
external/corefx/src/System.Net.Requests/src/System/Net/Cache/HttpCacheAgeControl.cs
vendored
Normal file
16
external/corefx/src/System.Net.Requests/src/System/Net/Cache/HttpCacheAgeControl.cs
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
// 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 HttpCacheAgeControl
|
||||
{
|
||||
None = 0x0,
|
||||
MinFresh = 0x1,
|
||||
MaxAge = 0x2,
|
||||
MaxStale = 0x4,
|
||||
MaxAgeAndMinFresh = 0x3,
|
||||
MaxAgeAndMaxStale = 0x6
|
||||
}
|
||||
}
|
19
external/corefx/src/System.Net.Requests/src/System/Net/Cache/HttpRequestCacheLevel.cs
vendored
Normal file
19
external/corefx/src/System.Net.Requests/src/System/Net/Cache/HttpRequestCacheLevel.cs
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
// 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 HttpRequestCacheLevel
|
||||
{
|
||||
Default = 0,
|
||||
BypassCache = 1,
|
||||
CacheOnly = 2,
|
||||
CacheIfAvailable = 3,
|
||||
Revalidate = 4,
|
||||
Reload = 5,
|
||||
NoCacheNoStore = 6,
|
||||
CacheOrNextCacheOnly = 7,
|
||||
Refresh = 8
|
||||
}
|
||||
}
|
123
external/corefx/src/System.Net.Requests/src/System/Net/Cache/HttpRequestCachePolicy.cs
vendored
Normal file
123
external/corefx/src/System.Net.Requests/src/System/Net/Cache/HttpRequestCachePolicy.cs
vendored
Normal file
@@ -0,0 +1,123 @@
|
||||
// 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.Globalization;
|
||||
|
||||
namespace System.Net.Cache
|
||||
{
|
||||
public class HttpRequestCachePolicy : RequestCachePolicy
|
||||
{
|
||||
private readonly DateTime _lastSyncDateUtc = DateTime.MinValue;
|
||||
private readonly TimeSpan _maxAge = TimeSpan.MaxValue;
|
||||
private readonly TimeSpan _minFresh = TimeSpan.MinValue;
|
||||
private readonly TimeSpan _maxStale = TimeSpan.MinValue;
|
||||
|
||||
public HttpRequestCachePolicy() : this(HttpRequestCacheLevel.Default)
|
||||
{
|
||||
}
|
||||
|
||||
public HttpRequestCachePolicy(HttpRequestCacheLevel level) : base(MapLevel(level))
|
||||
{
|
||||
Level = level;
|
||||
}
|
||||
|
||||
public HttpRequestCachePolicy(HttpCacheAgeControl cacheAgeControl, TimeSpan ageOrFreshOrStale) : this(HttpRequestCacheLevel.Default)
|
||||
{
|
||||
switch (cacheAgeControl)
|
||||
{
|
||||
case HttpCacheAgeControl.MinFresh:
|
||||
_minFresh = ageOrFreshOrStale;
|
||||
break;
|
||||
case HttpCacheAgeControl.MaxAge:
|
||||
_maxAge = ageOrFreshOrStale;
|
||||
break;
|
||||
case HttpCacheAgeControl.MaxStale:
|
||||
_maxStale = ageOrFreshOrStale;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException(SR.Format(SR.net_invalid_enum, nameof(HttpCacheAgeControl)), nameof(cacheAgeControl));
|
||||
}
|
||||
}
|
||||
|
||||
public HttpRequestCachePolicy(HttpCacheAgeControl cacheAgeControl, TimeSpan maxAge, TimeSpan freshOrStale) : this(HttpRequestCacheLevel.Default)
|
||||
{
|
||||
switch (cacheAgeControl)
|
||||
{
|
||||
case HttpCacheAgeControl.MinFresh:
|
||||
_minFresh = freshOrStale;
|
||||
break;
|
||||
case HttpCacheAgeControl.MaxAge:
|
||||
_maxAge = maxAge;
|
||||
break;
|
||||
case HttpCacheAgeControl.MaxStale:
|
||||
_maxStale = freshOrStale;
|
||||
break;
|
||||
case HttpCacheAgeControl.MaxAgeAndMinFresh:
|
||||
_maxAge = maxAge;
|
||||
_minFresh = freshOrStale;
|
||||
break;
|
||||
case HttpCacheAgeControl.MaxAgeAndMaxStale:
|
||||
_maxAge = maxAge;
|
||||
_maxStale = freshOrStale;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentException(SR.Format(SR.net_invalid_enum, nameof(HttpCacheAgeControl)), nameof(cacheAgeControl));
|
||||
}
|
||||
}
|
||||
|
||||
public HttpRequestCachePolicy(DateTime cacheSyncDate) :
|
||||
this(HttpRequestCacheLevel.Default)
|
||||
{
|
||||
_lastSyncDateUtc = cacheSyncDate.ToUniversalTime();
|
||||
}
|
||||
|
||||
public HttpRequestCachePolicy(HttpCacheAgeControl cacheAgeControl, TimeSpan maxAge, TimeSpan freshOrStale, DateTime cacheSyncDate) :
|
||||
this(cacheAgeControl, maxAge, freshOrStale)
|
||||
{
|
||||
_lastSyncDateUtc = cacheSyncDate.ToUniversalTime();
|
||||
}
|
||||
|
||||
public new HttpRequestCacheLevel Level { get; }
|
||||
|
||||
public DateTime CacheSyncDate =>
|
||||
_lastSyncDateUtc == DateTime.MinValue || _lastSyncDateUtc == DateTime.MaxValue ?
|
||||
_lastSyncDateUtc :
|
||||
_lastSyncDateUtc.ToLocalTime();
|
||||
|
||||
public TimeSpan MaxAge => _maxAge;
|
||||
|
||||
public TimeSpan MinFresh => _minFresh;
|
||||
|
||||
public TimeSpan MaxStale => _maxStale;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "Level:" + Level.ToString() +
|
||||
(_maxAge == TimeSpan.MaxValue ? string.Empty : " MaxAge:" + _maxAge.ToString()) +
|
||||
(_minFresh == TimeSpan.MinValue ? string.Empty : " MinFresh:" + _minFresh.ToString()) +
|
||||
(_maxStale == TimeSpan.MinValue ? string.Empty : " MaxStale:" + _maxStale.ToString()) +
|
||||
(CacheSyncDate == DateTime.MinValue ? string.Empty : " CacheSyncDate:" + CacheSyncDate.ToString(CultureInfo.CurrentCulture));
|
||||
}
|
||||
|
||||
private static RequestCacheLevel MapLevel(HttpRequestCacheLevel level)
|
||||
{
|
||||
if (level <= HttpRequestCacheLevel.NoCacheNoStore)
|
||||
{
|
||||
return (RequestCacheLevel)level;
|
||||
}
|
||||
|
||||
if (level == HttpRequestCacheLevel.CacheOrNextCacheOnly)
|
||||
{
|
||||
return RequestCacheLevel.CacheOnly;
|
||||
}
|
||||
|
||||
if (level == HttpRequestCacheLevel.Refresh)
|
||||
{
|
||||
return RequestCacheLevel.Reload;
|
||||
}
|
||||
|
||||
throw new ArgumentOutOfRangeException(nameof(level));
|
||||
}
|
||||
}
|
||||
}
|
723
external/corefx/src/System.Net.Requests/src/System/Net/CommandStream.cs
vendored
Normal file
723
external/corefx/src/System.Net.Requests/src/System/Net/CommandStream.cs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
15
external/corefx/src/System.Net.Requests/src/System/Net/ExceptionHelper.cs
vendored
Normal file
15
external/corefx/src/System.Net.Requests/src/System/Net/ExceptionHelper.cs
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
// 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
|
||||
{
|
||||
internal static class ExceptionHelper
|
||||
{
|
||||
internal static NotSupportedException PropertyNotSupportedException => new NotSupportedException(SR.net_PropertyNotSupportedException);
|
||||
|
||||
internal static WebException RequestAbortedException => new WebException(SR.net_reqaborted);
|
||||
|
||||
internal static WebException TimeoutException => new WebException(SR.net_timeout);
|
||||
}
|
||||
}
|
490
external/corefx/src/System.Net.Requests/src/System/Net/FileWebRequest.cs
vendored
Normal file
490
external/corefx/src/System.Net.Requests/src/System/Net/FileWebRequest.cs
vendored
Normal file
@@ -0,0 +1,490 @@
|
||||
// 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.IO;
|
||||
using System.Threading;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace System.Net
|
||||
{
|
||||
[Serializable]
|
||||
public class FileWebRequest : WebRequest, ISerializable
|
||||
{
|
||||
private readonly WebHeaderCollection _headers = new WebHeaderCollection();
|
||||
private string _method = WebRequestMethods.File.DownloadFile;
|
||||
private FileAccess _fileAccess = FileAccess.Read;
|
||||
private ManualResetEventSlim _blockReaderUntilRequestStreamDisposed;
|
||||
private WebResponse _response;
|
||||
private WebFileStream _stream;
|
||||
private Uri _uri;
|
||||
private long _contentLength;
|
||||
private int _timeout = DefaultTimeoutMilliseconds;
|
||||
private bool _readPending;
|
||||
private bool _writePending;
|
||||
private bool _writing;
|
||||
private bool _syncHint;
|
||||
private int _aborted;
|
||||
|
||||
internal FileWebRequest(Uri uri)
|
||||
{
|
||||
if (uri.Scheme != (object)Uri.UriSchemeFile)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(nameof(uri));
|
||||
}
|
||||
|
||||
_uri = uri;
|
||||
}
|
||||
|
||||
[Obsolete("Serialization is obsoleted for this type. http://go.microsoft.com/fwlink/?linkid=14202")]
|
||||
protected FileWebRequest(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext)
|
||||
{
|
||||
_headers = (WebHeaderCollection)serializationInfo.GetValue("headers", typeof(WebHeaderCollection));
|
||||
Proxy = (IWebProxy)serializationInfo.GetValue("proxy", typeof(IWebProxy));
|
||||
_uri = (Uri)serializationInfo.GetValue("uri", typeof(Uri));
|
||||
ConnectionGroupName = serializationInfo.GetString("connectionGroupName");
|
||||
_method = serializationInfo.GetString("method");
|
||||
_contentLength = serializationInfo.GetInt64("contentLength");
|
||||
_timeout = serializationInfo.GetInt32("timeout");
|
||||
_fileAccess = (FileAccess)serializationInfo.GetInt32("fileAccess");
|
||||
}
|
||||
|
||||
void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext) =>
|
||||
GetObjectData(serializationInfo, streamingContext);
|
||||
|
||||
protected override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
|
||||
{
|
||||
serializationInfo.AddValue("headers", _headers, typeof(WebHeaderCollection));
|
||||
serializationInfo.AddValue("proxy", Proxy, typeof(IWebProxy));
|
||||
serializationInfo.AddValue("uri", _uri, typeof(Uri));
|
||||
serializationInfo.AddValue("connectionGroupName", ConnectionGroupName);
|
||||
serializationInfo.AddValue("method", _method);
|
||||
serializationInfo.AddValue("contentLength", _contentLength);
|
||||
serializationInfo.AddValue("timeout", _timeout);
|
||||
serializationInfo.AddValue("fileAccess", _fileAccess);
|
||||
serializationInfo.AddValue("preauthenticate", false);
|
||||
base.GetObjectData(serializationInfo, streamingContext);
|
||||
}
|
||||
|
||||
internal bool Aborted => _aborted != 0;
|
||||
|
||||
public override string ConnectionGroupName { get; set; }
|
||||
|
||||
public override long ContentLength
|
||||
{
|
||||
get { return _contentLength; }
|
||||
set
|
||||
{
|
||||
if (value < 0)
|
||||
{
|
||||
throw new ArgumentException(SR.net_clsmall, nameof(value));
|
||||
}
|
||||
_contentLength = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override string ContentType
|
||||
{
|
||||
get { return _headers["Content-Type"]; }
|
||||
set { _headers["Content-Type"] = value; }
|
||||
}
|
||||
|
||||
public override ICredentials Credentials { get; set; }
|
||||
|
||||
public override WebHeaderCollection Headers => _headers;
|
||||
|
||||
public override string Method
|
||||
{
|
||||
get { return _method; }
|
||||
set
|
||||
{
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
throw new ArgumentException(SR.net_badmethod, nameof(value));
|
||||
}
|
||||
_method = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool PreAuthenticate { get; set; }
|
||||
|
||||
public override IWebProxy Proxy { get; set; }
|
||||
|
||||
public override int Timeout
|
||||
{
|
||||
get { return _timeout; }
|
||||
set
|
||||
{
|
||||
if (value < 0 && value != System.Threading.Timeout.Infinite)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(nameof(value), SR.net_io_timeout_use_ge_zero);
|
||||
}
|
||||
_timeout = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override Uri RequestUri => _uri;
|
||||
|
||||
private static Exception CreateRequestAbortedException() =>
|
||||
new WebException(SR.Format(SR.net_requestaborted, WebExceptionStatus.RequestCanceled), WebExceptionStatus.RequestCanceled);
|
||||
|
||||
private void CheckAndMarkAsyncGetRequestStreamPending()
|
||||
{
|
||||
if (Aborted)
|
||||
{
|
||||
throw CreateRequestAbortedException();
|
||||
}
|
||||
|
||||
if (string.Equals(_method, "GET", StringComparison.OrdinalIgnoreCase) ||
|
||||
string.Equals(_method, "HEAD", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
throw new ProtocolViolationException(SR.net_nouploadonget);
|
||||
}
|
||||
|
||||
if (_response != null)
|
||||
{
|
||||
throw new InvalidOperationException(SR.net_reqsubmitted);
|
||||
}
|
||||
|
||||
lock (this)
|
||||
{
|
||||
if (_writePending)
|
||||
{
|
||||
throw new InvalidOperationException(SR.net_repcall);
|
||||
}
|
||||
_writePending = true;
|
||||
}
|
||||
}
|
||||
|
||||
private Stream CreateWriteStream()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (_stream == null)
|
||||
{
|
||||
_stream = new WebFileStream(this, _uri.LocalPath, FileMode.Create, FileAccess.Write, FileShare.Read);
|
||||
_fileAccess = FileAccess.Write;
|
||||
_writing = true;
|
||||
}
|
||||
return _stream;
|
||||
}
|
||||
catch (Exception e) { throw new WebException(e.Message, e); }
|
||||
}
|
||||
|
||||
public override IAsyncResult BeginGetRequestStream(AsyncCallback callback, object state)
|
||||
{
|
||||
CheckAndMarkAsyncGetRequestStreamPending();
|
||||
Task<Stream> t = Task.Factory.StartNew(s => ((FileWebRequest)s).CreateWriteStream(),
|
||||
this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
|
||||
return TaskToApm.Begin(t, callback, state);
|
||||
}
|
||||
|
||||
public override Task<Stream> GetRequestStreamAsync()
|
||||
{
|
||||
CheckAndMarkAsyncGetRequestStreamPending();
|
||||
return Task.Factory.StartNew(s =>
|
||||
{
|
||||
FileWebRequest thisRef = (FileWebRequest)s;
|
||||
Stream writeStream = thisRef.CreateWriteStream();
|
||||
thisRef._writePending = false;
|
||||
return writeStream;
|
||||
}, this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
|
||||
}
|
||||
|
||||
private void CheckAndMarkAsyncGetResponsePending()
|
||||
{
|
||||
if (Aborted)
|
||||
{
|
||||
throw CreateRequestAbortedException();
|
||||
}
|
||||
|
||||
lock (this)
|
||||
{
|
||||
if (_readPending)
|
||||
{
|
||||
throw new InvalidOperationException(SR.net_repcall);
|
||||
}
|
||||
_readPending = true;
|
||||
}
|
||||
}
|
||||
|
||||
private WebResponse CreateResponse()
|
||||
{
|
||||
if (_writePending || _writing)
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
if (_writePending || _writing)
|
||||
{
|
||||
_blockReaderUntilRequestStreamDisposed = new ManualResetEventSlim();
|
||||
}
|
||||
}
|
||||
}
|
||||
_blockReaderUntilRequestStreamDisposed?.Wait();
|
||||
|
||||
try
|
||||
{
|
||||
return _response ?? (_response = new FileWebResponse(this, _uri, _fileAccess, !_syncHint));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new WebException(e.Message, e);
|
||||
}
|
||||
}
|
||||
|
||||
public override IAsyncResult BeginGetResponse(AsyncCallback callback, object state)
|
||||
{
|
||||
CheckAndMarkAsyncGetResponsePending();
|
||||
Task<WebResponse> t = Task.Factory.StartNew(s => ((FileWebRequest)s).CreateResponse(),
|
||||
this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
|
||||
return TaskToApm.Begin(t, callback, state);
|
||||
}
|
||||
|
||||
public override Task<WebResponse> GetResponseAsync()
|
||||
{
|
||||
CheckAndMarkAsyncGetResponsePending();
|
||||
return Task.Factory.StartNew(s =>
|
||||
{
|
||||
var thisRef = (FileWebRequest)s;
|
||||
WebResponse response = thisRef.CreateResponse();
|
||||
_readPending = false;
|
||||
return response;
|
||||
}, this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
|
||||
}
|
||||
|
||||
public override Stream EndGetRequestStream(IAsyncResult asyncResult)
|
||||
{
|
||||
Stream stream = TaskToApm.End<Stream>(asyncResult);
|
||||
_writePending = false;
|
||||
return stream;
|
||||
}
|
||||
|
||||
public override WebResponse EndGetResponse(IAsyncResult asyncResult)
|
||||
{
|
||||
WebResponse response = TaskToApm.End<WebResponse>(asyncResult);
|
||||
_readPending = false;
|
||||
return response;
|
||||
}
|
||||
|
||||
public override Stream GetRequestStream()
|
||||
{
|
||||
IAsyncResult result = BeginGetRequestStream(null, null);
|
||||
|
||||
if (Timeout != Threading.Timeout.Infinite &&
|
||||
!result.IsCompleted &&
|
||||
(!result.AsyncWaitHandle.WaitOne(Timeout, false) || !result.IsCompleted))
|
||||
{
|
||||
_stream?.Close();
|
||||
throw new WebException(SR.net_webstatus_Timeout, WebExceptionStatus.Timeout);
|
||||
}
|
||||
|
||||
return EndGetRequestStream(result);
|
||||
}
|
||||
|
||||
public override WebResponse GetResponse()
|
||||
{
|
||||
_syncHint = true;
|
||||
IAsyncResult result = BeginGetResponse(null, null);
|
||||
|
||||
if (Timeout != Threading.Timeout.Infinite &&
|
||||
!result.IsCompleted &&
|
||||
(!result.AsyncWaitHandle.WaitOne(Timeout, false) || !result.IsCompleted))
|
||||
{
|
||||
_response?.Close();
|
||||
throw new WebException(SR.net_webstatus_Timeout, WebExceptionStatus.Timeout);
|
||||
}
|
||||
|
||||
return EndGetResponse(result);
|
||||
}
|
||||
|
||||
internal void UnblockReader()
|
||||
{
|
||||
lock (this) { _blockReaderUntilRequestStreamDisposed?.Set(); }
|
||||
_writing = false;
|
||||
}
|
||||
|
||||
public override bool UseDefaultCredentials
|
||||
{
|
||||
get { throw NotImplemented.ByDesignWithMessage(SR.net_PropertyNotImplementedException); }
|
||||
set { throw NotImplemented.ByDesignWithMessage(SR.net_PropertyNotImplementedException); }
|
||||
}
|
||||
|
||||
public override void Abort()
|
||||
{
|
||||
if (Interlocked.Increment(ref _aborted) == 1)
|
||||
{
|
||||
_stream?.Abort();
|
||||
_response?.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class FileWebRequestCreator : IWebRequestCreate
|
||||
{
|
||||
public WebRequest Create(Uri uri) => new FileWebRequest(uri);
|
||||
}
|
||||
|
||||
internal sealed class WebFileStream : FileStream
|
||||
{
|
||||
private readonly FileWebRequest _request;
|
||||
|
||||
public WebFileStream(FileWebRequest request, string path, FileMode mode, FileAccess access, FileShare sharing) :
|
||||
base(path, mode, access, sharing)
|
||||
{
|
||||
_request = request;
|
||||
}
|
||||
|
||||
public WebFileStream(FileWebRequest request, string path, FileMode mode, FileAccess access, FileShare sharing, int length, bool async) :
|
||||
base(path, mode, access, sharing, length, async)
|
||||
{
|
||||
_request = request;
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
_request?.UnblockReader();
|
||||
}
|
||||
}
|
||||
finally { base.Dispose(disposing); }
|
||||
}
|
||||
|
||||
internal void Abort() => SafeFileHandle.Close();
|
||||
|
||||
public override int Read(byte[] buffer, int offset, int size)
|
||||
{
|
||||
CheckAborted();
|
||||
try
|
||||
{
|
||||
return base.Read(buffer, offset, size);
|
||||
}
|
||||
catch
|
||||
{
|
||||
CheckAborted();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Write(byte[] buffer, int offset, int size)
|
||||
{
|
||||
CheckAborted();
|
||||
try
|
||||
{
|
||||
base.Write(buffer, offset, size);
|
||||
}
|
||||
catch
|
||||
{
|
||||
CheckAborted();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public override IAsyncResult BeginRead(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
|
||||
{
|
||||
CheckAborted();
|
||||
try
|
||||
{
|
||||
return base.BeginRead(buffer, offset, size, callback, state);
|
||||
}
|
||||
catch
|
||||
{
|
||||
CheckAborted();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public override int EndRead(IAsyncResult ar)
|
||||
{
|
||||
try
|
||||
{
|
||||
return base.EndRead(ar);
|
||||
}
|
||||
catch
|
||||
{
|
||||
CheckAborted();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
|
||||
{
|
||||
CheckAborted();
|
||||
try
|
||||
{
|
||||
return base.BeginWrite(buffer, offset, size, callback, state);
|
||||
}
|
||||
catch
|
||||
{
|
||||
CheckAborted();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public override void EndWrite(IAsyncResult ar)
|
||||
{
|
||||
try
|
||||
{
|
||||
base.EndWrite(ar);
|
||||
}
|
||||
catch
|
||||
{
|
||||
CheckAborted();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
|
||||
{
|
||||
CheckAborted();
|
||||
try
|
||||
{
|
||||
return base.ReadAsync(buffer, offset, count, cancellationToken);
|
||||
}
|
||||
catch
|
||||
{
|
||||
CheckAborted();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
|
||||
{
|
||||
CheckAborted();
|
||||
try
|
||||
{
|
||||
return base.WriteAsync(buffer, offset, count, cancellationToken);
|
||||
}
|
||||
catch
|
||||
{
|
||||
CheckAborted();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
public override Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken)
|
||||
{
|
||||
CheckAborted();
|
||||
try
|
||||
{
|
||||
return base.CopyToAsync(destination, bufferSize, cancellationToken);
|
||||
}
|
||||
catch
|
||||
{
|
||||
CheckAborted();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckAborted()
|
||||
{
|
||||
if (_request.Aborted)
|
||||
{
|
||||
throw new WebException(SR.Format(SR.net_requestaborted, WebExceptionStatus.RequestCanceled), WebExceptionStatus.RequestCanceled);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
140
external/corefx/src/System.Net.Requests/src/System/Net/FileWebResponse.cs
vendored
Normal file
140
external/corefx/src/System.Net.Requests/src/System/Net/FileWebResponse.cs
vendored
Normal file
@@ -0,0 +1,140 @@
|
||||
// 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.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.Net
|
||||
{
|
||||
[Serializable]
|
||||
public class FileWebResponse : WebResponse, ISerializable
|
||||
{
|
||||
private const int DefaultFileStreamBufferSize = 8192;
|
||||
private const string DefaultFileContentType = "application/octet-stream";
|
||||
|
||||
private readonly long _contentLength;
|
||||
private readonly FileAccess _fileAccess;
|
||||
private readonly WebHeaderCollection _headers;
|
||||
private readonly Uri _uri;
|
||||
|
||||
private Stream _stream;
|
||||
private bool _closed;
|
||||
|
||||
internal FileWebResponse(FileWebRequest request, Uri uri, FileAccess access, bool useAsync)
|
||||
{
|
||||
try
|
||||
{
|
||||
_fileAccess = access;
|
||||
if (access == FileAccess.Write)
|
||||
{
|
||||
_stream = Stream.Null;
|
||||
}
|
||||
else
|
||||
{
|
||||
_stream = new WebFileStream(request, uri.LocalPath, FileMode.Open, FileAccess.Read, FileShare.Read, DefaultFileStreamBufferSize, useAsync);
|
||||
_contentLength = _stream.Length;
|
||||
}
|
||||
_headers = new WebHeaderCollection();
|
||||
_headers[HttpKnownHeaderNames.ContentLength] = _contentLength.ToString(NumberFormatInfo.InvariantInfo);
|
||||
_headers[HttpKnownHeaderNames.ContentType] = DefaultFileContentType;
|
||||
_uri = uri;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new WebException(e.Message, e, WebExceptionStatus.ConnectFailure, null);
|
||||
}
|
||||
}
|
||||
|
||||
[Obsolete("Serialization is obsoleted for this type. http://go.microsoft.com/fwlink/?linkid=14202")]
|
||||
protected FileWebResponse(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext)
|
||||
{
|
||||
_headers = (WebHeaderCollection)serializationInfo.GetValue("headers", typeof(WebHeaderCollection));
|
||||
_uri = (Uri)serializationInfo.GetValue("uri", typeof(Uri));
|
||||
_contentLength = serializationInfo.GetInt64("contentLength");
|
||||
_fileAccess = (FileAccess)serializationInfo.GetInt32("fileAccess");
|
||||
}
|
||||
|
||||
void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
|
||||
{
|
||||
GetObjectData(serializationInfo, streamingContext);
|
||||
}
|
||||
|
||||
protected override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
|
||||
{
|
||||
serializationInfo.AddValue("headers", _headers, typeof(WebHeaderCollection));
|
||||
serializationInfo.AddValue("uri", _uri, typeof(Uri));
|
||||
serializationInfo.AddValue("contentLength", _contentLength);
|
||||
serializationInfo.AddValue("fileAccess", _fileAccess);
|
||||
base.GetObjectData(serializationInfo, streamingContext);
|
||||
}
|
||||
|
||||
public override long ContentLength
|
||||
{
|
||||
get
|
||||
{
|
||||
CheckDisposed();
|
||||
return _contentLength;
|
||||
}
|
||||
}
|
||||
|
||||
public override string ContentType
|
||||
{
|
||||
get
|
||||
{
|
||||
CheckDisposed();
|
||||
return DefaultFileContentType;
|
||||
}
|
||||
}
|
||||
|
||||
public override WebHeaderCollection Headers
|
||||
{
|
||||
get
|
||||
{
|
||||
CheckDisposed();
|
||||
return _headers;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool SupportsHeaders => true;
|
||||
|
||||
public override Uri ResponseUri
|
||||
{
|
||||
get
|
||||
{
|
||||
CheckDisposed();
|
||||
return _uri;
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckDisposed()
|
||||
{
|
||||
if (_closed)
|
||||
{
|
||||
throw new ObjectDisposedException(this.GetType().FullName);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
if (!_closed)
|
||||
{
|
||||
_closed = true;
|
||||
|
||||
Stream chkStream = _stream;
|
||||
if (chkStream != null)
|
||||
{
|
||||
chkStream.Close();
|
||||
_stream = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override Stream GetResponseStream()
|
||||
{
|
||||
CheckDisposed();
|
||||
return _stream;
|
||||
}
|
||||
}
|
||||
}
|
1257
external/corefx/src/System.Net.Requests/src/System/Net/FtpControlStream.cs
vendored
Normal file
1257
external/corefx/src/System.Net.Requests/src/System/Net/FtpControlStream.cs
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user