Bagikan melalui


WebProxy.Address Properti

Definisi

Mendapatkan atau mengatur alamat server proksi.

public:
 property Uri ^ Address { Uri ^ get(); void set(Uri ^ value); };
public Uri? Address { get; set; }
public Uri Address { get; set; }
member this.Address : Uri with get, set
Public Property Address As Uri

Nilai Properti

Uri

Uri Instans yang berisi alamat server proksi.

Contoh

Contoh kode berikut menampilkan properti WebProxy objek, termasuk Address.

// The following method displays the properties of the 
// specified WebProxy instance.
void DisplayProxyProperties( WebProxy^ proxy )
{
   Console::WriteLine( "Address: {0}", proxy->Address );
   Console::WriteLine( "Bypass on local: {0}", proxy->BypassProxyOnLocal );

   int count = proxy->BypassList->Length;
   if ( count == 0 )
   {
      Console::WriteLine( "The bypass list is empty." );
      return;
   }

   array<String^>^bypass = proxy->BypassList;
   Console::WriteLine( "The bypass list contents:" );
   for ( int i = 0; i < count; i++ )
   {
      Console::WriteLine( bypass[ i ] );

   }
}
// The following method displays the properties of the
// specified WebProxy instance.

public static void DisplayProxyProperties(WebProxy proxy)
{
    Console.WriteLine("Address: {0}", proxy.Address);
    Console.WriteLine( "Bypass on local: {0}", proxy.BypassProxyOnLocal );

    int count = proxy.BypassList.Length;
    if (count == 0)
    {
        Console.WriteLine("The bypass list is empty.");
        return;
    }
    string[] bypass = proxy.BypassList;
    Console.WriteLine("The bypass list contents:");

    for (int i=0; i< count; i++)
    {
        Console.WriteLine(bypass[i]);
    }
}

Keterangan

Properti Address berisi alamat server proksi. Saat deteksi proksi otomatis tidak diaktifkan, dan tidak ada skrip konfigurasi otomatis yang ditentukan, Address properti dan BypassList tentukan proksi yang digunakan untuk permintaan.

Address Ketika properti adalah null, permintaan melewati proksi dan terhubung langsung ke host tujuan.

Berlaku untuk