WebProxy.BypassList 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定不使用 Proxy 伺服器的位址陣列。
public:
property cli::array <System::String ^> ^ BypassList { cli::array <System::String ^> ^ get(); void set(cli::array <System::String ^> ^ value); };
public string[] BypassList { get; set; }
member this.BypassList : string[] with get, set
Public Property BypassList As String()
屬性值
String[]
陣列,包含描述存取時不使用 Proxy 伺服器之 URI 的規則運算式清單。
範例
下列程式代碼範例會顯示 物件的屬性 WebProxy ,包括其 BypassList 屬性。
// 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]);
}
}
備註
BypassList屬性包含正則表達式的陣列,描述直接存取的URI,而不是透過 Proxy 伺服器存取。