WebProxy 생성자

정의

WebProxy 클래스의 새 인스턴스를 초기화합니다.

오버로드

WebProxy()

WebProxy 클래스의 빈 인스턴스를 초기화합니다.

WebProxy(String, Boolean, String[], ICredentials)

지정된 URI, 사용 안 함 설정, 사용하지 않을 URI 목록 및 자격 증명을 사용하여 WebProxy 클래스의 새 인스턴스를 초기화합니다.

WebProxy(Uri, Boolean, String[])

지정된 WebProxy 인스턴스, 사용 안 함 설정 및 사용하지 않을 URI 목록을 사용하여 Uri 클래스의 새 인스턴스를 초기화합니다.

WebProxy(String, Boolean, String[])

지정된 URI, 사용 안 함 설정 및 사용하지 않을 URI 목록을 사용하여 WebProxy 클래스의 새 인스턴스를 초기화합니다.

WebProxy(Uri, Boolean)

WebProxy 인스턴스와 사용 안 함 설정을 사용하여 Uri 클래스의 새 인스턴스를 초기화합니다.

WebProxy(Uri, Boolean, String[], ICredentials)

지정된 WebProxy 인스턴스, 사용 안 함 설정, 사용하지 않을 URI 목록 및 자격 증명을 사용하여 Uri 클래스의 새 인스턴스를 초기화합니다.

WebProxy(String, Boolean)

지정된 URI와 사용 안 함 설정을 사용하여 WebProxy 클래스의 새 인스턴스를 초기화합니다.

WebProxy(SerializationInfo, StreamingContext)
사용되지 않음.

이전에 serialize된 내용을 사용하여 WebProxy 클래스의 인스턴스를 초기화합니다.

WebProxy(Uri)

지정된 WebProxy 인스턴스에서 Uri클래스의 새 인스턴스를 초기화합니다.

WebProxy(String)

URI가 지정된 WebProxy 클래스의 새 인스턴스를 초기화합니다.

WebProxy(String, Int32)

지정된 호스트와 포트 번호를 사용하여 WebProxy 클래스의 새 인스턴스를 초기화합니다.

WebProxy()

Source:
WebProxy.cs
Source:
WebProxy.cs
Source:
WebProxy.cs

WebProxy 클래스의 빈 인스턴스를 초기화합니다.

public:
 WebProxy();
public WebProxy ();
Public Sub New ()

예제

다음 코드 예제에서는이 생성자를 호출 하는 방법을 보여 줍니다.

WebProxy^ CreateProxy()
{
   return gcnew WebProxy;
}
public static WebProxy CreateProxy()
{
    return new WebProxy();
}

설명

매개 변수가 없는 생성자는 속성이 로 설정된 클래스 AddressWebProxy 빈 instance 초기화합니다null.

속성이 이 Addressnull메서드가 IsBypassed 반환 true 되고 메서드가 GetProxy 대상 주소를 반환합니다.

적용 대상

WebProxy(String, Boolean, String[], ICredentials)

Source:
WebProxy.cs
Source:
WebProxy.cs
Source:
WebProxy.cs

지정된 URI, 사용 안 함 설정, 사용하지 않을 URI 목록 및 자격 증명을 사용하여 WebProxy 클래스의 새 인스턴스를 초기화합니다.

public:
 WebProxy(System::String ^ Address, bool BypassOnLocal, cli::array <System::String ^> ^ BypassList, System::Net::ICredentials ^ Credentials);
public WebProxy (string? Address, bool BypassOnLocal, string[]? BypassList, System.Net.ICredentials? Credentials);
public WebProxy (string Address, bool BypassOnLocal, string[] BypassList, System.Net.ICredentials Credentials);
new System.Net.WebProxy : string * bool * string[] * System.Net.ICredentials -> System.Net.WebProxy
Public Sub New (Address As String, BypassOnLocal As Boolean, BypassList As String(), Credentials As ICredentials)

매개 변수

Address
String

프록시 서버의 URI입니다.

BypassOnLocal
Boolean

로컬 주소의 프록시를 사용하지 않으려면 true이고, 그렇지 않으면 false입니다.

BypassList
String[]

사용하지 않을 서버의 URI가 들어 있는 정규식 문자열의 배열입니다.

Credentials
ICredentials

인증을 위해 프록시 서버에 제출할 ICredentials 인스턴스입니다.

예외

Address가 잘못된 URI인 경우

예제

다음 코드 예제에서는이 생성자를 호출 하는 방법을 보여 줍니다.

WebProxy^ CreateProxyWithCredentials( bool bypassLocal )
{
   // Do not use the proxy server for Contoso.com URIs.
   array<String^>^ bypassList = {";*.Contoso.com"};
   return gcnew WebProxy( "http://contoso",
      bypassLocal,
      bypassList,
      CredentialCache::DefaultCredentials );
}
public static WebProxy CreateProxyWithCredentials(bool bypassLocal)
{
    // Do not use the proxy server for Contoso.com URIs.
    string[] bypassList = new string[]{";*.Contoso.com"};
    return new WebProxy("http://contoso",
        bypassLocal,
        bypassList,
        CredentialCache.DefaultCredentials);
}

설명

WebProxy instance 속성이 포함된 Addressinstance 설정 Uri 되고, BypassProxyOnLocal 속성이 로 설정BypassOnLocal되고, 속성이 BypassList 로 설정되고, 속성이 Credentials 로 설정BypassListCredentials되어 초기화 Address 됩니다.

추가 정보

적용 대상

WebProxy(Uri, Boolean, String[])

Source:
WebProxy.cs
Source:
WebProxy.cs
Source:
WebProxy.cs

지정된 WebProxy 인스턴스, 사용 안 함 설정 및 사용하지 않을 URI 목록을 사용하여 Uri 클래스의 새 인스턴스를 초기화합니다.

public:
 WebProxy(Uri ^ Address, bool BypassOnLocal, cli::array <System::String ^> ^ BypassList);
public WebProxy (Uri? Address, bool BypassOnLocal, string[]? BypassList);
public WebProxy (Uri Address, bool BypassOnLocal, string[] BypassList);
new System.Net.WebProxy : Uri * bool * string[] -> System.Net.WebProxy
Public Sub New (Address As Uri, BypassOnLocal As Boolean, BypassList As String())

매개 변수

Address
Uri

프록시 서버의 주소를 포함하는 Uri 인스턴스입니다.

BypassOnLocal
Boolean

로컬 주소의 프록시를 사용하지 않으려면 true이고, 그렇지 않으면 false입니다.

BypassList
String[]

사용하지 않을 서버의 URI가 들어 있는 정규식 문자열의 배열입니다.

예제

다음 코드 예제에서는이 생성자를 호출 하는 방법을 보여 줍니다.

WebProxy^ CreateProxyWithBypassList( bool bypassLocal )
{
   // Do not use the proxy server for Contoso.com URIs.
   array<String^>^ bypassList = {";*.Contoso.com"};
   return gcnew WebProxy( gcnew Uri( "http://contoso" ),
      bypassLocal,
      bypassList );
}
public static WebProxy CreateProxyWithBypassList(bool bypassLocal)
{
    // Do not use the proxy server for Contoso.com URIs.
    string[] bypassList = new string[]{";*.Contoso.com"};
    return new WebProxy(new Uri("http://contoso"),
        bypassLocal,
        bypassList);
}

설명

WebProxy 인스턴스를 초기화할 합니다 Address 속성이로 설정 AddressBypassProxyOnLocal 속성이로 설정 BypassOnLocal, 및 BypassList 속성이로 설정 BypassList합니다.

적용 대상

WebProxy(String, Boolean, String[])

Source:
WebProxy.cs
Source:
WebProxy.cs
Source:
WebProxy.cs

지정된 URI, 사용 안 함 설정 및 사용하지 않을 URI 목록을 사용하여 WebProxy 클래스의 새 인스턴스를 초기화합니다.

public:
 WebProxy(System::String ^ Address, bool BypassOnLocal, cli::array <System::String ^> ^ BypassList);
public WebProxy (string? Address, bool BypassOnLocal, string[]? BypassList);
public WebProxy (string Address, bool BypassOnLocal, string[] BypassList);
new System.Net.WebProxy : string * bool * string[] -> System.Net.WebProxy
Public Sub New (Address As String, BypassOnLocal As Boolean, BypassList As String())

매개 변수

Address
String

프록시 서버의 URI입니다.

BypassOnLocal
Boolean

로컬 주소의 프록시를 사용하지 않으려면 true이고, 그렇지 않으면 false입니다.

BypassList
String[]

사용하지 않을 서버의 URI가 들어 있는 정규식 문자열의 배열입니다.

예외

Address가 잘못된 URI인 경우

예제

다음 코드 예제에서는이 생성자를 호출 하는 방법을 보여 줍니다.

WebProxy^ CreateProxyWithHostAndBypassList( bool bypassLocal )
{
   // Do not use the proxy server for Contoso.com URIs.
   array<String^>^ bypassList = {";*.Contoso.com"};
   return gcnew WebProxy( "http://contoso",
      bypassLocal,
      bypassList );
}
public static WebProxy CreateProxyWithHostAndBypassList(bool bypassLocal)
{
    // Do not use the proxy server for Contoso.com URIs.
    string[] bypassList = new string[]{";*.Contoso.com"};
    return new WebProxy("http://contoso",
        bypassLocal,
        bypassList);
}

설명

WebProxy instance 속성이 를 포함하는 Addressinstance 설정 Uri 되고, 속성이 로 설정되고, BypassProxyOnLocal 속성이 BypassList 로 설정BypassOnLocal되어 BypassList초기화 Address 됩니다.

추가 정보

적용 대상

WebProxy(Uri, Boolean)

Source:
WebProxy.cs
Source:
WebProxy.cs
Source:
WebProxy.cs

WebProxy 인스턴스와 사용 안 함 설정을 사용하여 Uri 클래스의 새 인스턴스를 초기화합니다.

public:
 WebProxy(Uri ^ Address, bool BypassOnLocal);
public WebProxy (Uri? Address, bool BypassOnLocal);
public WebProxy (Uri Address, bool BypassOnLocal);
new System.Net.WebProxy : Uri * bool -> System.Net.WebProxy
Public Sub New (Address As Uri, BypassOnLocal As Boolean)

매개 변수

Address
Uri

프록시 서버의 주소를 포함하는 Uri 인스턴스입니다.

BypassOnLocal
Boolean

로컬 주소의 프록시를 사용하지 않으려면 true이고, 그렇지 않으면 false입니다.

예제

다음 코드 예제에서는이 생성자를 호출 하는 방법을 보여 줍니다.

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

설명

WebProxy instance 속성이 로 Address 설정 Address 되고 속성이 로 설정된 BypassOnLocal상태에서 BypassProxyOnLocal 초기화됩니다.

적용 대상

WebProxy(Uri, Boolean, String[], ICredentials)

Source:
WebProxy.cs
Source:
WebProxy.cs
Source:
WebProxy.cs

지정된 WebProxy 인스턴스, 사용 안 함 설정, 사용하지 않을 URI 목록 및 자격 증명을 사용하여 Uri 클래스의 새 인스턴스를 초기화합니다.

public:
 WebProxy(Uri ^ Address, bool BypassOnLocal, cli::array <System::String ^> ^ BypassList, System::Net::ICredentials ^ Credentials);
public WebProxy (Uri? Address, bool BypassOnLocal, string[]? BypassList, System.Net.ICredentials? Credentials);
public WebProxy (Uri Address, bool BypassOnLocal, string[] BypassList, System.Net.ICredentials Credentials);
new System.Net.WebProxy : Uri * bool * string[] * System.Net.ICredentials -> System.Net.WebProxy
Public Sub New (Address As Uri, BypassOnLocal As Boolean, BypassList As String(), Credentials As ICredentials)

매개 변수

Address
Uri

프록시 서버의 주소를 포함하는 Uri 인스턴스입니다.

BypassOnLocal
Boolean

로컬 주소의 프록시를 사용하지 않으려면 true이고, 그렇지 않으면 false입니다.

BypassList
String[]

사용하지 않을 서버의 URI가 들어 있는 정규식 문자열의 배열입니다.

Credentials
ICredentials

인증을 위해 프록시 서버에 제출할 ICredentials 인스턴스입니다.

예제

다음 코드 예제에서는이 생성자를 호출 하는 방법을 보여 줍니다.

WebProxy^ CreateProxyWithCredentials2( bool bypassLocal )
{
   
   // Do not use the proxy server for Contoso.com URIs.
   array<String^>^ bypassList = {";*.Contoso.com"};
   return gcnew WebProxy( gcnew Uri( "http://contoso" ),
      bypassLocal,
      bypassList,
      CredentialCache::DefaultCredentials );
}
public static WebProxy CreateProxyWithCredentials2(bool bypassLocal)
{
    // Do not use the proxy server for Contoso.com URIs.
    string[] bypassList = new string[]{";*.Contoso.com"};
    return new WebProxy(new Uri("http://contoso"),
        bypassLocal,
        bypassList,
        CredentialCache.DefaultCredentials);
}

설명

WebProxy instance 속성이 로 Address 설정Address되고, 속성이 BypassProxyOnLocalBypassOnLocal설정되고, 속성이 BypassListBypassList설정되고, 속성이 Credentials 로 설정되어 Credentials초기화됩니다.

적용 대상

WebProxy(String, Boolean)

Source:
WebProxy.cs
Source:
WebProxy.cs
Source:
WebProxy.cs

지정된 URI와 사용 안 함 설정을 사용하여 WebProxy 클래스의 새 인스턴스를 초기화합니다.

public:
 WebProxy(System::String ^ Address, bool BypassOnLocal);
public WebProxy (string? Address, bool BypassOnLocal);
public WebProxy (string Address, bool BypassOnLocal);
new System.Net.WebProxy : string * bool -> System.Net.WebProxy
Public Sub New (Address As String, BypassOnLocal As Boolean)

매개 변수

Address
String

프록시 서버의 URI입니다.

BypassOnLocal
Boolean

로컬 주소의 프록시를 사용하지 않으려면 true이고, 그렇지 않으면 false입니다.

예외

Address가 잘못된 URI인 경우

예제

다음 코드 예제에서는이 생성자를 호출 하는 방법을 보여 줍니다.

WebProxy^ CreateProxyWithHostAddress( bool bypassLocal )
{
   WebProxy^ proxy = gcnew WebProxy( "http://contoso",bypassLocal );
   Console::WriteLine( "Bypass proxy for local URIs?: {0}", 
      proxy->BypassProxyOnLocal );
   return proxy;
}
public static WebProxy CreateProxyWithHostAddress(bool bypassLocal)
{
    WebProxy proxy =  new WebProxy("http://contoso", bypassLocal);
    Console.WriteLine("Bypass proxy for local URIs?: {0}",
       proxy.BypassProxyOnLocal);
    return proxy;
}

설명

WebProxy instance 포함하는 instance 설정되고 BypassProxyOnLocal 속성이 로 설정된 Uri 속성을 사용하여 BypassOnLocal초기화 Address 됩니다Address.

추가 정보

적용 대상

WebProxy(SerializationInfo, StreamingContext)

Source:
WebProxy.cs
Source:
WebProxy.cs
Source:
WebProxy.cs

주의

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

이전에 serialize된 내용을 사용하여 WebProxy 클래스의 인스턴스를 초기화합니다.

protected:
 WebProxy(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);
protected WebProxy (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected WebProxy (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);
new System.Net.WebProxy : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.WebProxy
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Net.WebProxy : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Net.WebProxy
Protected Sub New (serializationInfo As SerializationInfo, streamingContext As StreamingContext)

매개 변수

serializationInfo
SerializationInfo

serialization 데이터입니다.

streamingContext
StreamingContext

serialize된 데이터에 대한 컨텍스트입니다.

특성

설명

이 메서드는 시스템에서는 WebProxy 인스턴스 역직렬화; 호출 애플리케이션이 수행 합니다.

적용 대상

WebProxy(Uri)

Source:
WebProxy.cs
Source:
WebProxy.cs
Source:
WebProxy.cs

지정된 WebProxy 인스턴스에서 Uri클래스의 새 인스턴스를 초기화합니다.

public:
 WebProxy(Uri ^ Address);
public WebProxy (Uri? Address);
public WebProxy (Uri Address);
new System.Net.WebProxy : Uri -> System.Net.WebProxy
Public Sub New (Address As Uri)

매개 변수

Address
Uri

프록시 서버의 주소를 포함하는 Uri 인스턴스입니다.

예제

다음 코드 예제에서는이 생성자를 호출 하는 방법을 보여 줍니다.

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

설명

WebProxy instance 속성이 매개 변수로 Address 설정된 상태에서 Address 초기화됩니다.

적용 대상

WebProxy(String)

Source:
WebProxy.cs
Source:
WebProxy.cs
Source:
WebProxy.cs

URI가 지정된 WebProxy 클래스의 새 인스턴스를 초기화합니다.

public:
 WebProxy(System::String ^ Address);
public WebProxy (string? Address);
public WebProxy (string Address);
new System.Net.WebProxy : string -> System.Net.WebProxy
Public Sub New (Address As String)

매개 변수

Address
String

프록시 서버의 URI입니다.

예외

Address가 잘못된 URI인 경우

예제

다음 코드 예제에서는이 생성자를 호출 하는 방법을 보여 줍니다.

WebProxy^ CreateProxyWithHost()
{
   return gcnew WebProxy( "http://contoso" );
}
public static WebProxy CreateProxyWithHost()
{
    return new WebProxy("http://contoso");
}

설명

속성이 WebProxy 를 포함하는 instance 설정하여 Uri instance 초기화 Address 됩니다Address.

적용 대상

WebProxy(String, Int32)

Source:
WebProxy.cs
Source:
WebProxy.cs
Source:
WebProxy.cs

지정된 호스트와 포트 번호를 사용하여 WebProxy 클래스의 새 인스턴스를 초기화합니다.

public:
 WebProxy(System::String ^ Host, int Port);
public WebProxy (string Host, int Port);
new System.Net.WebProxy : string * int -> System.Net.WebProxy
Public Sub New (Host As String, Port As Integer)

매개 변수

Host
String

프록시 호스트의 이름입니다.

Port
Int32

사용할 Host의 포트 번호입니다.

예외

HostPort를 결합하여 만든 URI가 잘못된 URI인 경우

예제

다음 코드 예제에서는이 생성자를 호출 하는 방법을 보여 줍니다.

WebProxy^ CreateProxyWithHostAndPort()
{
   return gcnew WebProxy( "contoso",80 );
}
public static WebProxy CreateProxyWithHostAndPort()
{
    return new WebProxy("contoso", 80);
}

설명

WebProxy instance http:// 형식 HostPort의 instance 설정된 Uri 속성을 사용하여 초기화 Address 됩니다.

적용 대상