Freigeben über


WebProxy-Konstruktor (Uri, Boolean)

Initialisiert eine neue Instanz der WebProxy-Klasse mit der Uri-Instanz und der Umgehungseinstellung.

Namespace: System.Net
Assembly: System (in system.dll)

Syntax

'Declaration
Public Sub New ( _
    Address As Uri, _
    BypassOnLocal As Boolean _
)
'Usage
Dim Address As Uri
Dim BypassOnLocal As Boolean

Dim instance As New WebProxy(Address, BypassOnLocal)
public WebProxy (
    Uri Address,
    bool BypassOnLocal
)
public:
WebProxy (
    Uri^ Address, 
    bool BypassOnLocal
)
public WebProxy (
    Uri Address, 
    boolean BypassOnLocal
)
public function WebProxy (
    Address : Uri, 
    BypassOnLocal : boolean
)

Parameter

  • Address
    Eine Uri-Instanz mit der Adresse des Proxyservers.
  • BypassOnLocal
    true, um den Proxy bei lokalen Adressen zu umgehen, andernfalls false.

Hinweise

Beim Initialisieren der WebProxy-Instanz wird die Address-Eigenschaft auf Address und die BypassProxyOnLocal-Eigenschaft auf BypassOnLocal festgelegt.

Beispiel

Im folgenden Codebeispiel wird das Aufrufen dieses Konstruktors veranschaulicht.

public static WebProxy CreateProxyWithExampleAddress(bool bypassLocal)
{
    return new WebProxy(new Uri("http://contoso"), bypassLocal);
}
WebProxy^ CreateProxyWithExampleAddress( bool bypassLocal )
{
   return gcnew WebProxy( gcnew Uri( "http://contoso" ), bypassLocal );
}
public static WebProxy CreateProxyWithExampleAddress(boolean bypassLocal)
{
    return new WebProxy(new Uri("http://contoso"), bypassLocal);
} //CreateProxyWithExampleAddress

Plattformen

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

.NET Compact Framework

Unterstützt in: 2.0, 1.0

Siehe auch

Referenz

WebProxy-Klasse
WebProxy-Member
System.Net-Namespace