Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ TryCreate()

static HttpEnvironmentProxyCredentials System.Net.Http.HttpEnvironmentProxyCredentials.TryCreate ( Uri httpProxy,
Uri httpsProxy )
inlinestatic

Definition at line 38 of file HttpEnvironmentProxyCredentials.cs.

39 {
40 NetworkCredential networkCredential = null;
41 NetworkCredential networkCredential2 = null;
42 if (httpProxy != null)
43 {
44 networkCredential = GetCredentialsFromString(httpProxy.UserInfo);
45 }
46 if (httpsProxy != null)
47 {
48 networkCredential2 = GetCredentialsFromString(httpsProxy.UserInfo);
49 }
50 if (networkCredential == null && networkCredential2 == null)
51 {
52 return null;
53 }
54 return new HttpEnvironmentProxyCredentials(httpProxy, networkCredential, httpsProxy, networkCredential2);
55 }
static NetworkCredential GetCredentialsFromString(string value)
HttpEnvironmentProxyCredentials(Uri httpProxy, NetworkCredential httpCred, Uri httpsProxy, NetworkCredential httpsCred)

References System.Net.Http.HttpEnvironmentProxyCredentials.HttpEnvironmentProxyCredentials(), System.Net.Http.HttpEnvironmentProxyCredentials.GetCredentialsFromString(), and System.Uri.UserInfo.

Referenced by System.Net.Http.HttpEnvironmentProxy.HttpEnvironmentProxy().