WebProxy.Address WebProxy.Address WebProxy.Address WebProxy.Address Property

定義

プロキシ サーバーのアドレスを取得または設定します。Gets or sets the address of the proxy server.

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

プロパティ値

プロキシ サーバーのアドレスを格納している Uri インスタンス。A Uri instance that contains the address of the proxy server.

次のコード例では、をWebProxy Address含む、オブジェクトのプロパティを表示します。The following code example displays the properties of a WebProxy object, including its 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]);
    }
}

注釈

プロパティAddressは、プロキシサーバーのアドレスを格納します。The Address property contains the address of the proxy server. 自動プロキシ検出が有効になっておらず、自動構成スクリプトが指定Addressされていない場合は、プロパティを使用してBypassList 、要求に使用するプロキシを決定します。When automatic proxy detection is not enabled, and no automatic configuration script is specified, the Address property and BypassList determine the proxy used for a request.

Addressプロパティがnullの場合、要求はプロキシをバイパスし、宛先ホストに直接接続します。When the Address property is null, requests bypass the proxy and connect directly to the destination host.

適用対象