mscorlib(4.0.0.0) API with additions
System.Net.WebProxy Class Reference

Contains HTTP proxy settings for the T:System.Net.WebRequest class. More...

Inheritance diagram for System.Net.WebProxy:
[legend]
Collaboration diagram for System.Net.WebProxy:
[legend]

Public Member Functions

 WebProxy ()
 Initializes an empty instance of the T:System.Net.WebProxy class. More...
 
 WebProxy (Uri Address)
 Initializes a new instance of the T:System.Net.WebProxy class from the specified T:System.Uri instance. More...
 
 WebProxy (Uri Address, bool BypassOnLocal)
 Initializes a new instance of the T:System.Net.WebProxy class with the T:System.Uri instance and bypass setting. More...
 
 WebProxy (Uri Address, bool BypassOnLocal, string[] BypassList)
 Initializes a new instance of the T:System.Net.WebProxy class with the specified T:System.Uri instance, bypass setting, and list of URIs to bypass. More...
 
 WebProxy (Uri Address, bool BypassOnLocal, string[] BypassList, ICredentials Credentials)
 Initializes a new instance of the T:System.Net.WebProxy class with the specified T:System.Uri instance, bypass setting, list of URIs to bypass, and credentials. More...
 
 WebProxy (string Host, int Port)
 Initializes a new instance of the T:System.Net.WebProxy class with the specified host and port number. More...
 
 WebProxy (string Address)
 Initializes a new instance of the T:System.Net.WebProxy class with the specified URI. More...
 
 WebProxy (string Address, bool BypassOnLocal)
 Initializes a new instance of the T:System.Net.WebProxy class with the specified URI and bypass setting. More...
 
 WebProxy (string Address, bool BypassOnLocal, string[] BypassList)
 Initializes a new instance of the T:System.Net.WebProxy class with the specified URI, bypass setting, and list of URIs to bypass. More...
 
 WebProxy (string Address, bool BypassOnLocal, string[] BypassList, ICredentials Credentials)
 Initializes a new instance of the T:System.Net.WebProxy class with the specified URI, bypass setting, list of URIs to bypass, and credentials. More...
 
Uri GetProxy (Uri destination)
 Returns the proxied URI for a request. More...
 
bool IsBypassed (Uri host)
 Indicates whether to use the proxy server for the specified host. More...
 

Static Public Member Functions

static WebProxy GetDefaultProxy ()
 Reads the Internet Explorer nondynamic proxy settings. More...
 

Protected Member Functions

 WebProxy (SerializationInfo serializationInfo, StreamingContext streamingContext)
 Initializes an instance of the T:System.Net.WebProxy class using previously serialized content. More...
 
virtual void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
 Populates a T:System.Runtime.Serialization.SerializationInfo with the data that is needed to serialize the target object. More...
 

Properties

Uri Address [get, set]
 Gets or sets the address of the proxy server. More...
 
bool BypassProxyOnLocal [get, set]
 Gets or sets a value that indicates whether to bypass the proxy server for local addresses. More...
 
string [] BypassList [get, set]
 Gets or sets an array of addresses that do not use the proxy server. More...
 
ICredentials Credentials [get, set]
 Gets or sets the credentials to submit to the proxy server for authentication. More...
 
bool? UseDefaultCredentials [get, set]
 Gets or sets a T:System.Boolean value that controls whether the P:System.Net.CredentialCache.DefaultCredentials are sent with requests. More...
 
ArrayList BypassArrayList [get]
 Gets a list of addresses that do not use the proxy server. More...
 
- Properties inherited from System.Net.IWebProxy
ICredentials Credentials [get, set]
 The credentials to submit to the proxy server for authentication. More...
 

Detailed Description

Contains HTTP proxy settings for the T:System.Net.WebRequest class.

Definition at line 13 of file WebProxy.cs.

Constructor & Destructor Documentation

◆ WebProxy() [1/11]

System.Net.WebProxy.WebProxy ( )

Initializes an empty instance of the T:System.Net.WebProxy class.

Definition at line 178 of file WebProxy.cs.

◆ WebProxy() [2/11]

System.Net.WebProxy.WebProxy ( Uri  Address)

Initializes a new instance of the T:System.Net.WebProxy class from the specified T:System.Uri instance.

Parameters
AddressA T:System.Uri instance that contains the address of the proxy server.

Definition at line 185 of file WebProxy.cs.

◆ WebProxy() [3/11]

System.Net.WebProxy.WebProxy ( Uri  Address,
bool  BypassOnLocal 
)

Initializes a new instance of the T:System.Net.WebProxy class with the T:System.Uri instance and bypass setting.

Parameters
AddressA T:System.Uri instance that contains the address of the proxy server.
BypassOnLocaltrue to bypass the proxy for local addresses; otherwise, false.

Definition at line 194 of file WebProxy.cs.

◆ WebProxy() [4/11]

System.Net.WebProxy.WebProxy ( Uri  Address,
bool  BypassOnLocal,
string []  BypassList 
)

Initializes a new instance of the T:System.Net.WebProxy class with the specified T:System.Uri instance, bypass setting, and list of URIs to bypass.

Parameters
AddressA T:System.Uri instance that contains the address of the proxy server.
BypassOnLocaltrue to bypass the proxy for local addresses; otherwise, false.
BypassListAn array of regular expression strings that contains the URIs of the servers to bypass.

Definition at line 204 of file WebProxy.cs.

◆ WebProxy() [5/11]

System.Net.WebProxy.WebProxy ( Uri  Address,
bool  BypassOnLocal,
string []  BypassList,
ICredentials  Credentials 
)

Initializes a new instance of the T:System.Net.WebProxy class with the specified T:System.Uri instance, bypass setting, list of URIs to bypass, and credentials.

Parameters
AddressA T:System.Uri instance that contains the address of the proxy server.
BypassOnLocaltrue to bypass the proxy for local addresses; otherwise, false.
BypassListAn array of regular expression strings that contains the URIs of the servers to bypass.
CredentialsAn T:System.Net.ICredentials instance to submit to the proxy server for authentication.

Definition at line 215 of file WebProxy.cs.

◆ WebProxy() [6/11]

System.Net.WebProxy.WebProxy ( string  Host,
int  Port 
)

Initializes a new instance of the T:System.Net.WebProxy class with the specified host and port number.

Parameters
HostThe name of the proxy host.
PortThe port number on Host to use.
Exceptions
T:System.UriFormatExceptionThe URI formed by combining Host and Port is not a valid URI.

Definition at line 232 of file WebProxy.cs.

◆ WebProxy() [7/11]

System.Net.WebProxy.WebProxy ( string  Address)

Initializes a new instance of the T:System.Net.WebProxy class with the specified URI.

Parameters
AddressThe URI of the proxy server.
Exceptions
T:System.UriFormatExceptionAddress is an invalid URI.

Definition at line 241 of file WebProxy.cs.

◆ WebProxy() [8/11]

System.Net.WebProxy.WebProxy ( string  Address,
bool  BypassOnLocal 
)

Initializes a new instance of the T:System.Net.WebProxy class with the specified URI and bypass setting.

Parameters
AddressThe URI of the proxy server.
BypassOnLocaltrue to bypass the proxy for local addresses; otherwise, false.
Exceptions
T:System.UriFormatExceptionAddress is an invalid URI.

Definition at line 252 of file WebProxy.cs.

◆ WebProxy() [9/11]

System.Net.WebProxy.WebProxy ( string  Address,
bool  BypassOnLocal,
string []  BypassList 
)

Initializes a new instance of the T:System.Net.WebProxy class with the specified URI, bypass setting, and list of URIs to bypass.

Parameters
AddressThe URI of the proxy server.
BypassOnLocaltrue to bypass the proxy for local addresses; otherwise, false.
BypassListAn array of regular expression strings that contain the URIs of the servers to bypass.
Exceptions
T:System.UriFormatExceptionAddress is an invalid URI.

Definition at line 264 of file WebProxy.cs.

◆ WebProxy() [10/11]

System.Net.WebProxy.WebProxy ( string  Address,
bool  BypassOnLocal,
string []  BypassList,
ICredentials  Credentials 
)

Initializes a new instance of the T:System.Net.WebProxy class with the specified URI, bypass setting, list of URIs to bypass, and credentials.

Parameters
AddressThe URI of the proxy server.
BypassOnLocaltrue to bypass the proxy for local addresses; otherwise, false.
BypassListAn array of regular expression strings that contains the URIs of the servers to bypass.
CredentialsAn T:System.Net.ICredentials instance to submit to the proxy server for authentication.
Exceptions
T:System.UriFormatExceptionAddress is an invalid URI.

Definition at line 277 of file WebProxy.cs.

◆ WebProxy() [11/11]

System.Net.WebProxy.WebProxy ( SerializationInfo  serializationInfo,
StreamingContext  streamingContext 
)
protected

Initializes an instance of the T:System.Net.WebProxy class using previously serialized content.

Parameters
serializationInfoThe serialization data.
streamingContextThe context for the serialized data.

Definition at line 456 of file WebProxy.cs.

Member Function Documentation

◆ GetDefaultProxy()

static WebProxy System.Net.WebProxy.GetDefaultProxy ( )
static

Reads the Internet Explorer nondynamic proxy settings.

Returns
A T:System.Net.WebProxy instance that contains the nondynamic proxy settings from Internet Explorer 5.5 and later.

Definition at line 447 of file WebProxy.cs.

◆ GetObjectData()

virtual void System.Net.WebProxy.GetObjectData ( SerializationInfo  serializationInfo,
StreamingContext  streamingContext 
)
protectedvirtual

Populates a T:System.Runtime.Serialization.SerializationInfo with the data that is needed to serialize the target object.

Parameters
serializationInfoThe T:System.Runtime.Serialization.SerializationInfo to populate with data.
streamingContextA T:System.Runtime.Serialization.StreamingContext that specifies the destination for this serialization.

Implements System.Runtime.Serialization.ISerializable.

Definition at line 497 of file WebProxy.cs.

◆ GetProxy()

Uri System.Net.WebProxy.GetProxy ( Uri  destination)

Returns the proxied URI for a request.

Parameters
destinationThe T:System.Uri instance of the requested Internet resource.
Returns
The T:System.Uri instance of the Internet resource, if the resource is on the bypass list; otherwise, the T:System.Uri instance of the proxy.
Exceptions
T:System.ArgumentNullExceptionThe destination parameter is null.

Implements System.Net.IWebProxy.

Definition at line 294 of file WebProxy.cs.

◆ IsBypassed()

bool System.Net.WebProxy.IsBypassed ( Uri  host)

Indicates whether to use the proxy server for the specified host.

Parameters
hostThe T:System.Uri instance of the host to check for proxy use.
Returns
true if the proxy server should not be used for host ; otherwise, false.
Exceptions
T:System.ArgumentNullExceptionThe host parameter is null.

Implements System.Net.IWebProxy.

Definition at line 418 of file WebProxy.cs.

Property Documentation

◆ Address

Uri System.Net.WebProxy.Address
getset

Gets or sets the address of the proxy server.

Returns
A T:System.Uri instance that contains the address of the proxy server.

Definition at line 36 of file WebProxy.cs.

◆ BypassArrayList

ArrayList System.Net.WebProxy.BypassArrayList
get

Gets a list of addresses that do not use the proxy server.

Returns
An T:System.Collections.ArrayList that contains a list of P:System.Net.WebProxy.BypassList arrays that represents URIs that do not use the proxy server when accessed.

Definition at line 153 of file WebProxy.cs.

◆ BypassList

string [] System.Net.WebProxy.BypassList
getset

Gets or sets an array of addresses that do not use the proxy server.

Returns
An array that contains a list of regular expressions that describe URIs that do not use the proxy server when accessed.

Definition at line 96 of file WebProxy.cs.

◆ BypassProxyOnLocal

bool System.Net.WebProxy.BypassProxyOnLocal
getset

Gets or sets a value that indicates whether to bypass the proxy server for local addresses.

Returns
true to bypass the proxy server for local addresses; otherwise, false. The default value is false.

Definition at line 79 of file WebProxy.cs.

◆ Credentials

ICredentials System.Net.WebProxy.Credentials
getset

Gets or sets the credentials to submit to the proxy server for authentication.

Returns
An T:System.Net.ICredentials instance that contains the credentials to submit to the proxy server for authentication.
Exceptions
T:System.InvalidOperationExceptionYou attempted to set this property when the P:System.Net.WebProxy.UseDefaultCredentials property was set to true.

Definition at line 119 of file WebProxy.cs.

◆ UseDefaultCredentials

bool? System.Net.WebProxy.UseDefaultCredentials
getset

Gets or sets a T:System.Boolean value that controls whether the P:System.Net.CredentialCache.DefaultCredentials are sent with requests.

Returns
true if the default credentials are used; otherwise, false. The default value is false.
Exceptions
T:System.InvalidOperationExceptionYou attempted to set this property when the P:System.Net.WebProxy.Credentials property contains credentials other than the default credentials. For more information, see the Remarks section.

Definition at line 135 of file WebProxy.cs.


The documentation for this class was generated from the following file: