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

◆ Create() [3/3]

static WebRequest System.Net.WebRequest.Create ( Uri requestUri,
bool useUriBase )
inlinestaticprivate

Definition at line 246 of file WebRequest.cs.

247 {
248 WebRequestPrefixElement webRequestPrefixElement = null;
249 bool flag = false;
251 int length = text.Length;
253 for (int i = 0; i < prefixList.Count; i++)
254 {
256 if (length >= webRequestPrefixElement.Prefix.Length && string.Compare(webRequestPrefixElement.Prefix, 0, text, 0, webRequestPrefixElement.Prefix.Length, StringComparison.OrdinalIgnoreCase) == 0)
257 {
258 flag = true;
259 break;
260 }
261 }
262 if (flag)
263 {
264 return webRequestPrefixElement.Creator.Create(requestUri);
265 }
266 throw new NotSupportedException(System.SR.net_unknown_prefix);
267 }
static List< WebRequestPrefixElement > PrefixList
Definition WebRequest.cs:46
static string net_unknown_prefix
Definition SR.cs:14
Definition SR.cs:7

References System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Runtime.Serialization.Dictionary, System.length, System.SR.net_unknown_prefix, System.Net.WebRequest.PrefixList, and System.text.

Referenced by ReLogic.Peripherals.RGB.SteelSeries.GameSenseConnection._sendServer(), and System.Net.WebClient.GetWebRequest().