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 要求的全域預設 Proxy 執行個體。

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
屬性

範例

下列程式碼範例會在 GlobalProxySelection 埠 80 上設定名為 「webproxy」 的 HTTP Proxy。

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 儲存實例用來連絡區域網路外部網際網路網站之預設 Proxy 的 Proxy WebRequest 設定。 預設 Proxy 設定是從全域或應用程式組態檔初始化,而且可以透過將 屬性設定 HttpWebRequest.Proxy 為 方法的結果 GetEmptyWebProxy 來覆寫個別要求或停用。

儲存在 中的 GlobalProxySelection Proxy 設定會由 WebRequest 任何支援 Proxy 的衍生物件使用,並將其 Proxy 屬性值設定為 null (預設) 。 、 HttpWebRequestWebClient 目前支援 FtpWebRequest Proxy。

注意GlobalProxySelection在提出要求之後的 變更不會反映在 中 WebRequest

建構函式

GlobalProxySelection()
已淘汰.
已淘汰.
已淘汰.

初始化 GlobalProxySelection 類別的新執行個體。

屬性

Select
已淘汰.
已淘汰.
已淘汰.

取得或設定全域 HTTP Proxy。

方法

Equals(Object)
已淘汰.
已淘汰.
已淘汰.

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetEmptyWebProxy()
已淘汰.
已淘汰.
已淘汰.

傳回空的 Proxy 執行個體。

GetHashCode()
已淘汰.
已淘汰.
已淘汰.

做為預設雜湊函式。

(繼承來源 Object)
GetType()
已淘汰.
已淘汰.
已淘汰.

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()
已淘汰.
已淘汰.
已淘汰.

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()
已淘汰.
已淘汰.
已淘汰.

傳回代表目前物件的字串。

(繼承來源 Object)

適用於

另請參閱