GlobalProxySelection 类

定义

注意

This class has been deprecated. Please use WebRequest.DefaultWebProxy instead to access and set the global default proxy. Use 'null' instead of GetEmptyWebProxy. https://go.microsoft.com/fwlink/?linkid=14202

注意

GlobalProxySelection has been deprecated. Use WebRequest.DefaultWebProxy instead to access and set the global default proxy. Use 'null' instead of GetEmptyWebProxy.

注意

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

包含所有 HTTP 请求的全局默认代理实例。

public ref class GlobalProxySelection
[System.Obsolete("This class has been deprecated. Please use WebRequest.DefaultWebProxy instead to access and set the global default proxy. Use 'null' instead of GetEmptyWebProxy. https://go.microsoft.com/fwlink/?linkid=14202")]
public class GlobalProxySelection
[System.Obsolete("GlobalProxySelection has been deprecated. Use WebRequest.DefaultWebProxy instead to access and set the global default proxy. Use 'null' instead of GetEmptyWebProxy.")]
public class GlobalProxySelection
[System.Obsolete("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 class GlobalProxySelection
[<System.Obsolete("This class has been deprecated. Please use WebRequest.DefaultWebProxy instead to access and set the global default proxy. Use 'null' instead of GetEmptyWebProxy. https://go.microsoft.com/fwlink/?linkid=14202")>]
type GlobalProxySelection = class
[<System.Obsolete("GlobalProxySelection has been deprecated. Use WebRequest.DefaultWebProxy instead to access and set the global default proxy. Use 'null' instead of GetEmptyWebProxy.")>]
type GlobalProxySelection = class
[<System.Obsolete("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")>]
type GlobalProxySelection = class
type GlobalProxySelection = class
Public Class GlobalProxySelection
继承
GlobalProxySelection
属性

示例

下面的代码示例为端口 80 上名为“webproxy”的 HTTP 代理设置 GlobalProxySelection

Uri^ proxyURI = gcnew Uri( "http://webproxy:80" );
GlobalProxySelection::Select = gcnew WebProxy( proxyURI );
Uri proxyURI = new Uri("http://webproxy:80");
GlobalProxySelection.Select = new WebProxy(proxyURI);
Dim proxyURI As New Uri("http://webproxy:80")
GlobalProxySelection.Select = New WebProxy(proxyURI)

注解

GlobalProxySelection存储默认代理的代理设置,实例使用该代理WebRequest来联系本地网络以外的 Internet 站点。 默认代理设置是从全局配置文件或应用程序配置文件初始化的,可以为单个请求重写或通过将 属性设置为 HttpWebRequest.Proxy 方法的结果 GetEmptyWebProxy 来禁用。

GlobalProxySelection存储的代理设置由支持代理并将其Proxy属性值设置为null (默认) 的任何WebRequest派生对象使用。 、 和 WebClient当前支持FtpWebRequestHttpWebRequest代理。

注意 发出请求后对 GlobalProxySelection 的更改不会反映在 中 WebRequest

构造函数

GlobalProxySelection()
已过时.
已过时.
已过时.

初始化 GlobalProxySelection 类的新实例。

属性

Select
已过时.
已过时.
已过时.

获取或设置全局 HTTP 代理。

方法

Equals(Object)
已过时.
已过时.
已过时.

确定指定对象是否等于当前对象。

(继承自 Object)
GetEmptyWebProxy()
已过时.
已过时.
已过时.

返回空代理实例。

GetHashCode()
已过时.
已过时.
已过时.

作为默认哈希函数。

(继承自 Object)
GetType()
已过时.
已过时.
已过时.

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()
已过时.
已过时.
已过时.

创建当前 Object 的浅表副本。

(继承自 Object)
ToString()
已过时.
已过时.
已过时.

返回表示当前对象的字符串。

(继承自 Object)

适用于

另请参阅