WebProxy.Address Proprietà

Definizione

Recupera o imposta l'indirizzo del server proxy.

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

Valore della proprietà

Uri

Istanza di Uri in cui è contenuto l'indirizzo del server proxy.

Esempio

Nell'esempio di codice seguente vengono visualizzate le proprietà di un WebProxy oggetto, incluso il relativo 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]);
    }
}

Commenti

La Address proprietà contiene l'indirizzo del server proxy. Quando il rilevamento proxy automatico non è abilitato e non viene specificato alcun script di configurazione automatico, la Address proprietà e BypassList determina il proxy usato per una richiesta.

Quando la proprietà è null, richiede ignorare il Address proxy e connettersi direttamente all'host di destinazione.

Si applica a