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

Function GetProxy ( _ destination As Uri _ ) As Uri
Dim instance As IWebProxy Dim destination As Uri Dim returnValue As Uri returnValue = instance.GetProxy(destination)
Uri GetProxy ( Uri destination )
Uri^ GetProxy ( Uri^ destination )
Uri GetProxy ( Uri destination )
function GetProxy ( destination : Uri ) : Uri
戻り値
destination と通信するために使用するプロキシの URI を格納している Uri インスタンス。


GetProxy メソッドを使用して、WebRequest がインターネット リソースにアクセスするために使用する URI を返す例を次に示します。
Public Shared Sub Main() Dim webProxy_Interface As New WebProxy_Interface(New Uri("http://proxy.example.com")) webProxy_Interface.Credentials = New NetworkCredential("microsoft", ".Net") Console.WriteLine("The web proxy is : {0}", webProxy_Interface.GetProxy(New Uri("http://www.microsoft.com"))) 'Determine whether the Web proxy can be bypassed for the site "http://www.microsoft.com". console.writeline("For the Uri http://www.microsoft.com , the ") If webProxy_Interface.IsBypassed(New Uri("http://www.microsoft.com")) Then Console.WriteLine("webproxy is by passed") Else Console.WriteLine("webproxy is not bypassed") End If End Sub 'Main
WebProxy_Interface webProxy_Interface = new WebProxy_Interface(new Uri("http://proxy.example.com")); webProxy_Interface.Credentials = new NetworkCredential("microsoft", ".Net"); Console.WriteLine("The web proxy is : {0}", webProxy_Interface.GetProxy(new Uri("http://www.microsoft.com"))); // Determine whether the Web proxy can be bypassed for the site "http://www.microsoft.com". if(webProxy_Interface.IsBypassed(new Uri("http://www.microsoft.com"))) Console.WriteLine("Web Proxy is by passed"); else Console.WriteLine("Web Proxy is not by passed");
WebProxy_Interface^ webProxy_Interface = gcnew WebProxy_Interface( gcnew Uri( "http://proxy.example.com" ) ); webProxy_Interface->Credentials = gcnew NetworkCredential( "microsoft",".Net" ); Console::WriteLine( "The web proxy is : {0}", webProxy_Interface->GetProxy( gcnew Uri( "http://www.microsoft.com" ) ) ); // Check if the webproxy can ne bypassed for the site S"http://www.microsoft.com". if ( webProxy_Interface->IsBypassed( gcnew Uri( "http://www.microsoft.com" ) ) ) { Console::WriteLine( "Web Proxy is by passed" ); } else { Console::WriteLine( "Web Proxy is not by passed" ); }
WebProxyInterface webProxyInterface = new WebProxyInterface( new Uri("http://proxy.server.com")); webProxyInterface.set_Credentials(new NetworkCredential( "microsoft", ".Net")); Console.WriteLine("The web proxy is : {0}", webProxyInterface. GetProxy(new Uri("http://www.microsoft.com"))); // Check if the webproxy can ne bypassed for the site //"http://www.microsoft.com". if (webProxyInterface.IsBypassed(new Uri( "http://www.microsoft.com"))) { Console.WriteLine("Web Proxy is by passed"); } else { Console.WriteLine("Web Proxy is not by passed"); }

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に収録されているすべての辞書からIWebProxy.GetProxy メソッドを検索する場合は、下記のリンクをクリックしてください。

- IWebProxy.GetProxy メソッドのページへのリンク