terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
CookieContainer.cs
Go to the documentation of this file.
1using System;
7
8namespace System.Net
9{
10 // Token: 0x02000216 RID: 534
12 public class CookieContainer
13 {
14 // Token: 0x06000D2C RID: 3372 RVA: 0x00029FC4 File Offset: 0x000281C4
16 {
18 base..ctor();
19 if (global::System.Net.NetworkInformation.IPGlobalProperties.InternalGetIPGlobalProperties() != null)
20 {
21 string text;
23 }
24 }
25
26 // Token: 0x06000D2D RID: 3373 RVA: 0x00029FF0 File Offset: 0x000281F0
31
32 // Token: 0x06000D2E RID: 3374 RVA: 0x0002A010 File Offset: 0x00028210
38
39 // Token: 0x170002C1 RID: 705
40 // (get) Token: 0x06000D2F RID: 3375 RVA: 0x0002A04C File Offset: 0x0002824C
41 // (set) Token: 0x06000D30 RID: 3376 RVA: 0x0002A060 File Offset: 0x00028260
42 public int Capacity
43 {
44 get
45 {
46 return this.m_maxCookies;
47 }
48 set
49 {
51 int maxCookies = this.m_maxCookies;
54 }
55 }
56
57 // Token: 0x170002C2 RID: 706
58 // (get) Token: 0x06000D31 RID: 3377 RVA: 0x0002A0A4 File Offset: 0x000282A4
59 public int Count
60 {
61 get
62 {
63 return this.m_count;
64 }
65 }
66
67 // Token: 0x170002C3 RID: 707
68 // (get) Token: 0x06000D32 RID: 3378 RVA: 0x0002A0B8 File Offset: 0x000282B8
69 // (set) Token: 0x06000D33 RID: 3379 RVA: 0x0002A0CC File Offset: 0x000282CC
70 public int MaxCookieSize
71 {
72 get
73 {
74 return this.m_maxCookieSize;
75 }
76 set
77 {
79 }
80 }
81
82 // Token: 0x170002C4 RID: 708
83 // (get) Token: 0x06000D34 RID: 3380 RVA: 0x0002A0E0 File Offset: 0x000282E0
84 // (set) Token: 0x06000D35 RID: 3381 RVA: 0x0002A0F4 File Offset: 0x000282F4
86 {
87 get
88 {
89 return this.m_maxCookiesPerDomain;
90 }
91 set
92 {
93 int maxCookies = this.m_maxCookies;
97 }
98 }
99
100 // Token: 0x06000D36 RID: 3382 RVA: 0x0002A120 File Offset: 0x00028320
101 public void Add(Cookie cookie)
102 {
103 if (cookie != null && cookie.m_domain._stringLength != 0)
104 {
105 bool secure = cookie.m_secure;
106 if (32 == 0)
107 {
108 }
109 if (!cookie.m_domain_implicit)
110 {
111 string domain = cookie.m_domain;
112 long num = 0L;
113 char c = domain[(int)num];
114 }
115 string domain2 = cookie.m_domain;
116 int[] port_list = cookie.m_port_list;
117 int[] port_list2 = cookie.m_port_list;
118 string path = cookie.m_path;
119 if (32 == 0)
120 {
121 }
122 Cookie cookie2 = cookie.Clone();
123 string text;
124 bool flag = this.IsLocalDomain(text);
125 string fqdnMyDomain = this.m_fqdnMyDomain;
126 return;
127 }
128 string @string = SR.GetString("The parameter '{0}' cannot be an empty string.");
129 }
130
131 // Token: 0x06000D37 RID: 3383 RVA: 0x0002A1BC File Offset: 0x000283BC
132 private void AddRemoveDomain(string key, PathList value)
133 {
136 if (value != null)
137 {
138 return;
139 }
140 long num = 0L;
142 if (num == 0L)
143 {
144 return;
145 }
146 throw new OutOfMemoryException();
147 }
148
149 // Token: 0x06000D38 RID: 3384 RVA: 0x0002A20C File Offset: 0x0002840C
150 internal void Add(Cookie cookie, bool throwOnError)
151 {
152 int stringLength = cookie.m_value._stringLength;
153 throw new ArrayTypeMismatchException();
154 }
155
156 // Token: 0x06000D39 RID: 3385 RVA: 0x0002A3B0 File Offset: 0x000285B0
157 private bool AgeCookies(string domain)
158 {
159 int count;
160 if (this.m_maxCookies != 0)
161 {
163 if (maxCookiesPerDomain != 0)
164 {
165 if (maxCookiesPerDomain == 0)
166 {
167 int maxCookies = this.m_maxCookies;
168 }
169 count = this.m_count;
170 }
171 }
172 long num = 0L;
173 Monitor.Enter(this.m_domainTable, num != 0L);
175 if (count != 0)
176 {
177 }
178 if (count != 0)
179 {
180 }
182 if (domain != null)
183 {
185 }
186 Monitor.Enter(domainTable2._buckets, true);
187 Hashtable.bucket[] buckets = domainTable2._buckets;
188 if (true)
189 {
190 }
191 object key = buckets.key;
192 object val = buckets.val;
193 if (true)
194 {
195 }
196 object key2 = buckets.key;
197 object val2 = buckets.val;
198 if (true)
199 {
200 }
201 object key3 = buckets.key;
202 object val3 = buckets.val;
203 if (buckets != null)
204 {
205 }
206 int count2 = this.m_count;
208 if (!true)
209 {
210 }
211 bool flag;
212 return flag;
213 }
214
215 // Token: 0x06000D3A RID: 3386 RVA: 0x0002A7B0 File Offset: 0x000289B0
217 {
218 ArrayList list = cc.m_list;
219 Cookie cookie;
220 bool expired = cookie.Expired;
221 ArrayList list2 = cc.m_list;
222 ArrayList list3 = cc.m_list;
223 long num = 0L;
224 Monitor.Exit(cc);
225 if (num == 0L)
226 {
227 }
228 throw new OutOfMemoryException();
229 }
230
231 // Token: 0x06000D3B RID: 3387 RVA: 0x0002A808 File Offset: 0x00028A08
232 public void Add(CookieCollection cookies)
233 {
234 if (cookies != null)
235 {
236 IEnumerator enumerator = cookies.GetEnumerator();
237 return;
238 }
239 throw new OutOfMemoryException();
240 }
241
242 // Token: 0x06000D3C RID: 3388 RVA: 0x0002A84C File Offset: 0x00028A4C
243 internal bool IsLocalDomain(string host)
244 {
245 int num = 46;
246 int num2 = host.IndexOf((char)num);
247 bool flag = host == "127.0.0.1";
248 bool flag2 = host == "::1";
249 bool flag3 = host == "0:0:0:0:0:0:0:1";
250 int stringLength = this.m_fqdnMyDomain._stringLength;
251 int num3;
252 if (num3 == 0)
253 {
254 return;
255 }
256 string[] array;
257 if (array != null)
258 {
259 bool flag4 = array == "127";
260 return;
261 }
262 }
263
264 // Token: 0x06000D3D RID: 3389 RVA: 0x0002A8C8 File Offset: 0x00028AC8
265 public void Add(global::System.Uri uri, Cookie cookie)
266 {
267 do
268 {
269 if (!true)
270 {
271 }
272 }
273 while (cookie == null);
274 Cookie cookie2 = cookie.Clone();
275 string host = uri.Host;
276 string fqdnMyDomain = this.m_fqdnMyDomain;
277 }
278
279 // Token: 0x06000D3E RID: 3390 RVA: 0x0002A8F4 File Offset: 0x00028AF4
280 public void Add(global::System.Uri uri, CookieCollection cookies)
281 {
282 if (!true)
283 {
284 }
285 if (cookies != null)
286 {
287 string host = uri.Host;
288 bool flag = this.IsLocalDomain(host);
289 IEnumerator enumerator = cookies.GetEnumerator();
290 return;
291 }
292 throw new OutOfMemoryException();
293 }
294
295 // Token: 0x06000D3F RID: 3391 RVA: 0x0002A988 File Offset: 0x00028B88
296 internal CookieCollection CookieCutter(global::System.Uri uri, string headerName, string setCookieHeader, bool isThrow)
297 {
298 int num = 1;
299 if (headerName != null)
300 {
301 if (num == 0)
302 {
303 }
304 int num2;
305 if (num2 == 0)
306 {
307 }
308 }
309 string host = uri.Host;
310 bool flag = this.IsLocalDomain(host);
311 Cookie cookie;
312 if (cookie != null)
313 {
314 bool flag2 = ValidationHelper.IsBlankString(cookie.m_name);
315 string fqdnMyDomain = this.m_fqdnMyDomain;
316 string @string = SR.GetString("Cookie format error.");
317 throw new OutOfMemoryException();
318 }
319 IEnumerator enumerator;
320 if (enumerator != null)
321 {
322 }
323 long num3 = 0L;
324 if (enumerator != null)
325 {
326 }
327 if (num3 == 0L)
328 {
329 throw new InvalidCastException();
330 }
331 throw new OutOfMemoryException();
332 }
333
334 // Token: 0x06000D40 RID: 3392 RVA: 0x0002AA18 File Offset: 0x00028C18
335 public CookieCollection GetCookies(global::System.Uri uri)
336 {
337 if (!true)
338 {
339 }
340 return this.InternalGetCookies(uri);
341 }
342
343 // Token: 0x06000D41 RID: 3393 RVA: 0x0002AA30 File Offset: 0x00028C30
344 internal CookieCollection InternalGetCookies(global::System.Uri uri)
345 {
346 /*
347An exception occurred when decompiling this method (06000D41)
348
349ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Net.CookieCollection System.Net.CookieContainer::InternalGetCookies(System.Uri)
350
351 ---> System.Exception: Basic block has to end with unconditional control flow.
352{
353 Block_1:
354 stloc:int64(var_9_50, ldc.i4:int64(0))
355 stloc:string(var_10_5A, call:string(string::Concat, ldloc:string(var_3_14), ldloc:string(var_8_40)))
356 stloc:int32(var_11_62, ldfld:int32(string::_stringLength, ldloc:string(var_3_14)))
357 stloc:int32(var_12_66, ldc.i4:int32(46))
358 stloc:int32(var_13_72, call:int32(string::LastIndexOf, ldloc:string(var_3_14), ldloc:int32[exp:char](var_12_66), ldloc:int64[exp:int32](var_9_50)))
359 stloc:int32(var_14_76, ldc.i4:int32(46))
360 stloc:int32(var_15_82, call:int32(string::LastIndexOf, ldloc:string(var_3_14), ldloc:int32[exp:char](var_14_76), ldloc:int64[exp:int32](var_9_50)))
361 stloc:int32(var_16_86, ldc.i4:int32(46))
362 stloc:int32(var_17_92, call:int32(string::IndexOf, ldloc:string(var_3_14), ldloc:int32[exp:char](var_16_86), ldloc:int64[exp:int32](var_9_50)))
363 stloc:string(var_18_9C, call:string(string::Substring, ldloc:string(var_3_14), ldloc:int32(var_17_92)))
364 stloc:string(var_19_A4, ldfld:string(CookieContainer::m_fqdnMyDomain, ldloc:CookieContainer(this)))
365}
366
367 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
368 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
369 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
370 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
371 --- End of inner exception stack trace ---
372 at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
373 at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1683
374*/;
375 }
376
377 // Token: 0x06000D42 RID: 3394 RVA: 0x0002AAE4 File Offset: 0x00028CE4
379 {
380 int size = domainAttribute._size;
381 if (!false)
382 {
383 return;
384 }
385 throw new OutOfMemoryException();
386 }
387
388 // Token: 0x06000D43 RID: 3395 RVA: 0x0002ABD8 File Offset: 0x00028DD8
390 {
391 long num = 0L;
392 ArrayList list = source.m_list;
393 Cookie cookie = source[(int)num];
394 bool expired = cookie.Expired;
395 ArrayList list2 = source.m_list;
396 int count = this.m_count;
398 }
399
400 // Token: 0x06000D44 RID: 3396 RVA: 0x0002AC84 File Offset: 0x00028E84
401 public string GetCookieHeader(global::System.Uri uri)
402 {
403 string text;
404 return text;
405 }
406
407 // Token: 0x06000D45 RID: 3397 RVA: 0x0002AC94 File Offset: 0x00028E94
408 internal string GetCookieHeader(global::System.Uri uri, [Out] string optCookie2)
409 {
410 CookieCollection cookieCollection = this.InternalGetCookies(uri);
411 IEnumerator enumerator = cookieCollection.GetEnumerator();
412 if (enumerator != null)
413 {
414 }
415 string text;
416 return text;
417 }
418
419 // Token: 0x06000D46 RID: 3398 RVA: 0x0002ACFC File Offset: 0x00028EFC
420 public void SetCookies(global::System.Uri uri, string cookieHeader)
421 {
422 do
423 {
424 if (!true)
425 {
426 }
427 }
428 while (cookieHeader == null);
429 }
430
431 // Token: 0x06000D47 RID: 3399 RVA: 0x0002AD10 File Offset: 0x00028F10
432 // Note: this type is marked as 'beforefieldinit'.
434 {
435 }
436
437 // Token: 0x04000B44 RID: 2884
438 public const int DefaultCookieLimit = 300;
439
440 // Token: 0x04000B45 RID: 2885
441 public const int DefaultPerDomainCookieLimit = 20;
442
443 // Token: 0x04000B46 RID: 2886
444 public const int DefaultCookieLengthLimit = 4096;
445
446 // Token: 0x04000B47 RID: 2887
448
449 // Token: 0x04000B48 RID: 2888
451
452 // Token: 0x04000B49 RID: 2889
453 private int m_maxCookieSize;
454
455 // Token: 0x04000B4A RID: 2890
456 private int m_maxCookies;
457
458 // Token: 0x04000B4B RID: 2891
460
461 // Token: 0x04000B4C RID: 2892
462 private int m_count;
463
464 // Token: 0x04000B4D RID: 2893
465 private string m_fqdnMyDomain;
466 }
467}
class f__AnonymousType0<< Count > j__TPar
static string GetString(string name, params object[] args)
Definition SR.cs:9
Definition SR.cs:7
CookieCollection CookieCutter(global::System.Uri uri, string headerName, string setCookieHeader, bool isThrow)
int ExpireCollection(CookieCollection cc)
void MergeUpdateCollections(CookieCollection destination, CookieCollection source, int port, bool isSecure, bool isPlainOnly)
void BuildCookieCollectionFromDomainMatches(global::System.Uri uri, bool isSecure, int port, CookieCollection cookies, List< string > domainAttribute, bool matchOnlyPlainCookie)
bool IsLocalDomain(string host)
CookieContainer(int capacity, int perDomainCapacity, int maxCookieSize)
void Add(Cookie cookie, bool throwOnError)
static readonly HeaderVariantInfo[] HeaderInfo
void SetCookies(global::System.Uri uri, string cookieHeader)
void AddRemoveDomain(string key, PathList value)
string GetCookieHeader(global::System.Uri uri, [Out] string optCookie2)
void Add(global::System.Uri uri, Cookie cookie)
CookieCollection InternalGetCookies(global::System.Uri uri)
void Add(global::System.Uri uri, CookieCollection cookies)
string GetCookieHeader(global::System.Uri uri)
CookieCollection GetCookies(global::System.Uri uri)
void Add(CookieCollection cookies)
bool AgeCookies(string domain)
Cookie Clone()
Definition Cookie.cs:304
static bool IsBlankString(string stringValue)
static void Exit(object obj)
Definition Monitor.cs:47
static void Enter(object obj)
Definition Monitor.cs:11