Bagikan melalui


GlobalProxySelection Kelas

Definisi

Perhatian

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

Perhatian

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

Perhatian

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

Berisi instans proksi default global untuk semua permintaan 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
Warisan
GlobalProxySelection
Atribut

Contoh

Contoh kode berikut menetapkan GlobalProxySelection untuk proksi HTTP bernama "webproxy" pada port 80.

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)

Keterangan

menyimpan GlobalProxySelection pengaturan proksi untuk proksi default yang WebRequest digunakan instans untuk menghubungi situs Internet di luar jaringan lokal. Pengaturan proksi default diinisialisasi dari file konfigurasi global atau aplikasi, dan dapat diganti untuk permintaan individual atau dinonaktifkan dengan mengatur HttpWebRequest.Proxy properti ke hasil GetEmptyWebProxy metode .

Pengaturan proksi yang disimpan di GlobalProxySelection digunakan oleh objek turunan apa pun WebRequest yang mendukung proksi dan nilai propertinya Proxy diatur ke null (default). Proksi saat ini didukung oleh FtpWebRequest, , HttpWebRequestdan WebClient.

Catatan Perubahan pada GlobalProxySelection setelah permintaan dibuat tidak tercermin dalam WebRequest.

Konstruktor

GlobalProxySelection()
Kedaluwarsa.
Kedaluwarsa.
Kedaluwarsa.

Menginisialisasi instans baru kelas GlobalProxySelection.

Properti

Select
Kedaluwarsa.
Kedaluwarsa.
Kedaluwarsa.

Mendapatkan atau mengatur proksi HTTP global.

Metode

Equals(Object)
Kedaluwarsa.
Kedaluwarsa.
Kedaluwarsa.

Menentukan apakah objek yang ditentukan sama dengan objek saat ini.

(Diperoleh dari Object)
GetEmptyWebProxy()
Kedaluwarsa.
Kedaluwarsa.
Kedaluwarsa.

Mengembalikan instans proksi kosong.

GetHashCode()
Kedaluwarsa.
Kedaluwarsa.
Kedaluwarsa.

Berfungsi sebagai fungsi hash default.

(Diperoleh dari Object)
GetType()
Kedaluwarsa.
Kedaluwarsa.
Kedaluwarsa.

Mendapatkan dari instans Type saat ini.

(Diperoleh dari Object)
MemberwiseClone()
Kedaluwarsa.
Kedaluwarsa.
Kedaluwarsa.

Membuat salinan dangkal dari saat ini Object.

(Diperoleh dari Object)
ToString()
Kedaluwarsa.
Kedaluwarsa.
Kedaluwarsa.

Mengembalikan string yang mewakili objek saat ini.

(Diperoleh dari Object)

Berlaku untuk

Lihat juga