Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
GlobalProxySelection.cs
Go to the documentation of this file.
1
using
System.Diagnostics.CodeAnalysis
;
2
3
namespace
System.Net
;
4
5
[Obsolete(
"GlobalProxySelection has been deprecated. Use WebRequest.DefaultWebProxy instead to access and set the global default proxy. Use 'null' instead of GetEmptyWebProxy."
)]
6
public
class
GlobalProxySelection
7
{
8
private
sealed
class
EmptyWebProxy
:
IWebProxy
9
{
10
private
ICredentials
_credentials
;
11
12
public
ICredentials
Credentials
13
{
14
get
15
{
16
return
_credentials
;
17
}
18
set
19
{
20
_credentials
=
value
;
21
}
22
}
23
24
public
Uri
GetProxy
(
Uri
uri)
25
{
26
return
uri;
27
}
28
29
public
bool
IsBypassed
(
Uri
uri)
30
{
31
return
true
;
32
}
33
}
34
35
public
static
IWebProxy
Select
36
{
37
get
38
{
39
return
WebRequest.DefaultWebProxy ??
GetEmptyWebProxy
();
40
}
41
[param: AllowNull]
42
set
43
{
44
WebRequest.DefaultWebProxy =
value
;
45
}
46
}
47
48
public
static
IWebProxy
GetEmptyWebProxy
()
49
{
50
return
new
EmptyWebProxy
();
51
}
52
}
System.Net.GlobalProxySelection.EmptyWebProxy.Credentials
ICredentials Credentials
Definition
GlobalProxySelection.cs:13
System.Net.GlobalProxySelection.EmptyWebProxy._credentials
ICredentials _credentials
Definition
GlobalProxySelection.cs:10
System.Net.GlobalProxySelection.EmptyWebProxy.IsBypassed
bool IsBypassed(Uri uri)
Definition
GlobalProxySelection.cs:29
System.Net.GlobalProxySelection.EmptyWebProxy.GetProxy
Uri GetProxy(Uri uri)
Definition
GlobalProxySelection.cs:24
System.Net.GlobalProxySelection.EmptyWebProxy
Definition
GlobalProxySelection.cs:9
System.Net.GlobalProxySelection.Select
static IWebProxy Select
Definition
GlobalProxySelection.cs:36
System.Net.GlobalProxySelection.GetEmptyWebProxy
static IWebProxy GetEmptyWebProxy()
Definition
GlobalProxySelection.cs:48
System.Net.GlobalProxySelection
Definition
GlobalProxySelection.cs:7
System.Uri
Definition
Uri.cs:16
System.Net.ICredentials
Definition
ICredentials.cs:4
System.Net.IWebProxy
Definition
IWebProxy.cs:4
System.Diagnostics.CodeAnalysis
Definition
AllowNullAttribute.cs:1
System.Net
Definition
HttpClientJsonExtensions.cs:8
System.ExceptionArgument.value
@ value
source
System.Net.Requests
System.Net
GlobalProxySelection.cs
Generated by
1.10.0