WebProxy.IsBypassed メソッド
アセンブリ: System (system.dll 内)

Dim instance As WebProxy Dim host As Uri Dim returnValue As Boolean returnValue = instance.IsBypassed(host)
戻り値
host でプロキシ サーバーを使用しない場合は true。それ以外の場合は false。

IsBypassed メソッドを使用して、インターネット リソースにアクセスする場合に、プロキシ サーバーをバイパスするかどうかを決めます。
BypassProxyOnLocal プロパティと BypassList プロパティは、IsBypassed メソッドの戻り値を制御します。

WebProxy オブジェクトを作成し、このメソッドを呼び出して、バイパス一覧が正しく設定されているかどうかを確認するコード例を次に示します。
public static WebProxy CreateProxyAndCheckBypass(bool bypassLocal) { // Do not use the proxy server for Contoso.com URIs. string[] bypassList = new string[]{";*.Contoso.com"}; WebProxy proxy = new WebProxy("http://contoso", bypassLocal, bypassList); // Test the bypass list. if (!proxy.IsBypassed(new Uri("http://www.Contoso.com"))) { Console.WriteLine("Bypass not working!"); return null; } else { Console.WriteLine("Bypass is working."); return proxy; } }
WebProxy^ CreateProxyAndCheckBypass( bool bypassLocal ) { // Do not use the proxy server for Contoso.com URIs. array<String^>^ bypassList = {";*.Contoso.com"}; WebProxy^ proxy = gcnew WebProxy( "http://contoso", bypassLocal, bypassList ); // Test the bypass list. if ( !proxy->IsBypassed( gcnew Uri( "http://www.Contoso.com" ) ) ) { Console::WriteLine( "Bypass not working!" ); return nullptr; } else { Console::WriteLine( "Bypass is working." ); return proxy; } }
public static WebProxy CreateProxyAndCheckBypass(boolean bypassLocal) { // Do not use the proxy server for Contoso.com URIs. String bypassList[] = new String[] { ";*.Contoso.com" }; WebProxy proxy = new WebProxy("http://contoso" , bypassLocal, bypassList); // Test the bypass list. if (!(proxy.IsBypassed(new Uri("http://www.Contoso.com")))) { Console.WriteLine("Bypass not working!"); return null; } else { Console.WriteLine("Bypass is working."); return proxy; } } //CreateProxyAndCheckBypass

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からWebProxy.IsBypassed メソッドを検索する場合は、下記のリンクをクリックしてください。

- WebProxy.IsBypassed メソッドのページへのリンク