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

◆ ProxyAddressIfNecessary()

static bool System.Net.ServicePointManager.ProxyAddressIfNecessary ( ref Uri address,
IWebProxy proxy )
inlinestaticprivate

Definition at line 170 of file ServicePointManager.cs.

171 {
172 if (proxy != null && !address.IsLoopback)
173 {
174 try
175 {
176 Uri proxy2 = proxy.GetProxy(address);
177 if (proxy2 != null)
178 {
179 if (proxy2.Scheme != Uri.UriSchemeHttp)
180 {
181 throw new NotSupportedException(System.SR.Format(System.SR.net_proxyschemenotsupported, address.Scheme));
182 }
183 address = proxy2;
184 return true;
185 }
186 }
187 catch (PlatformNotSupportedException)
188 {
189 }
190 }
191 return false;
192 }
static string net_proxyschemenotsupported
Definition SR.cs:14
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
Definition SR.cs:7

References System.SR.Format(), System.SR.net_proxyschemenotsupported, and System.Uri.UriSchemeHttp.

Referenced by System.Net.ServicePointManager.FindServicePoint().