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
WebPermission.cs
Go to the documentation of this file.
1using System;
9
10namespace System.Net
11{
12 // Token: 0x020001D4 RID: 468
15 {
16 // Token: 0x17000252 RID: 594
17 // (get) Token: 0x06000B63 RID: 2915 RVA: 0x00002050 File Offset: 0x00000250
18 internal static global::System.Text.RegularExpressions.Regex MatchAllRegex
19 {
20 get
21 {
22 throw new global::Cpp2IlInjected.AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
23 }
24 }
25
26 // Token: 0x17000253 RID: 595
27 // (get) Token: 0x06000B64 RID: 2916 RVA: 0x00025428 File Offset: 0x00023628
29 {
30 get
31 {
32 if (!this.m_UnrestrictedConnect)
33 {
34 if (false)
35 {
36 }
37 global::System.Text.RegularExpressions.Regex regex;
38 if (regex != null)
39 {
40 }
41 if (!false || regex != null)
42 {
43 }
44 throw new InvalidCastException();
45 }
46 global::System.Text.RegularExpressions.Regex matchAllRegex = WebPermission.MatchAllRegex;
47 if (matchAllRegex == null || matchAllRegex != null)
48 {
49 IEnumerator enumerator;
50 return enumerator;
51 }
53 }
54 }
55
56 // Token: 0x17000254 RID: 596
57 // (get) Token: 0x06000B65 RID: 2917 RVA: 0x00025468 File Offset: 0x00023668
59 {
60 get
61 {
62 if (!this.m_UnrestrictedAccept)
63 {
64 if (false)
65 {
66 }
67 global::System.Text.RegularExpressions.Regex regex;
68 if (regex != null)
69 {
70 }
71 if (!false || regex != null)
72 {
73 }
74 throw new InvalidCastException();
75 }
76 global::System.Text.RegularExpressions.Regex matchAllRegex = WebPermission.MatchAllRegex;
77 if (matchAllRegex == null || matchAllRegex != null)
78 {
79 IEnumerator enumerator;
80 return enumerator;
81 }
83 }
84 }
85
86 // Token: 0x06000B66 RID: 2918 RVA: 0x000254A8 File Offset: 0x000236A8
91
92 // Token: 0x06000B67 RID: 2919 RVA: 0x000254C4 File Offset: 0x000236C4
94 {
95 }
96
97 // Token: 0x06000B68 RID: 2920 RVA: 0x000254D8 File Offset: 0x000236D8
99 {
100 }
101
102 // Token: 0x06000B69 RID: 2921 RVA: 0x000254EC File Offset: 0x000236EC
104 {
106 }
107
108 // Token: 0x06000B6A RID: 2922 RVA: 0x00025508 File Offset: 0x00023708
109 public WebPermission(NetworkAccess access, global::System.Text.RegularExpressions.Regex uriRegex)
110 {
111 this.AddPermission(access, uriRegex);
112 }
113
114 // Token: 0x06000B6B RID: 2923 RVA: 0x00025524 File Offset: 0x00023724
115 public WebPermission(NetworkAccess access, string uriString)
116 {
117 this.AddPermission(access, uriString);
118 }
119
120 // Token: 0x06000B6C RID: 2924 RVA: 0x00025540 File Offset: 0x00023740
121 internal WebPermission(NetworkAccess access, global::System.Uri uri)
122 {
123 this.AddPermission(access, uri);
124 }
125
126 // Token: 0x06000B6D RID: 2925 RVA: 0x0002555C File Offset: 0x0002375C
127 public void AddPermission(NetworkAccess access, string uriString)
128 {
129 if (uriString == null)
130 {
131 throw new OutOfMemoryException();
132 }
133 if (!this.m_noRestriction)
134 {
135 return;
136 }
137 }
138
139 // Token: 0x06000B6E RID: 2926 RVA: 0x000255F0 File Offset: 0x000237F0
140 internal void AddPermission(NetworkAccess access, global::System.Uri uri)
141 {
142 if (!true)
143 {
144 }
145 if (!this.m_noRestriction)
146 {
147 if (!this.m_UnrestrictedConnect)
148 {
150 }
151 if (!this.m_UnrestrictedAccept)
152 {
154 }
155 return;
156 }
157 }
158
159 // Token: 0x06000B6F RID: 2927 RVA: 0x0002568C File Offset: 0x0002388C
160 public void AddPermission(NetworkAccess access, global::System.Text.RegularExpressions.Regex uriRegex)
161 {
162 for (;;)
163 {
164 if (uriRegex != null)
165 {
166 if (this.m_noRestriction)
167 {
168 break;
169 }
170 if (!this.m_UnrestrictedConnect)
171 {
174 }
175 if (!this.m_UnrestrictedAccept)
176 {
177 goto Block_3;
178 }
179 }
180 }
181 return;
182 Block_3:
185 }
186
187 // Token: 0x06000B70 RID: 2928 RVA: 0x000256D4 File Offset: 0x000238D4
189 {
190 if (this.m_UnrestrictedConnect)
191 {
192 if (!this.m_UnrestrictedAccept)
193 {
195 return;
196 }
197 }
198 else
199 {
201 }
202 }
203
204 // Token: 0x06000B71 RID: 2929 RVA: 0x00025754 File Offset: 0x00023954
205 public bool IsUnrestricted()
206 {
207 return this.m_noRestriction;
208 }
209
210 // Token: 0x06000B72 RID: 2930 RVA: 0x00025768 File Offset: 0x00023968
211 public override IPermission Copy()
212 {
213 do
214 {
215 if (this.m_noRestriction)
216 {
217 }
220 if (this.m_acceptList != null)
221 {
222 }
223 }
224 while (this.m_connectList == null);
225 throw new InvalidCastException();
226 }
227
228 // Token: 0x06000B73 RID: 2931 RVA: 0x000257A4 File Offset: 0x000239A4
229 public override bool IsSubsetOf(IPermission target)
230 {
231 if (target != null)
232 {
233 }
234 if (!this.m_noRestriction && !this.m_UnrestrictedConnect && !this.m_UnrestrictedAccept && this.m_connectList == null)
235 {
237 if (!this.m_noRestriction)
238 {
239 goto IL_0034;
240 }
241 }
242 long num = 0L;
243 IL_0034:
245 if (num != 0L)
246 {
247 while (num != 0L)
248 {
249 }
252 while (connectList == null)
253 {
254 }
255 while (connectList == null)
256 {
257 }
259 if (connectList2 != null)
260 {
261 }
262 bool flag;
263 return flag;
264 }
265 object syncRoot = connectList2._syncRoot;
266 while (syncRoot == null)
267 {
268 }
269 while (syncRoot == null)
270 {
271 }
272 object syncRoot2 = connectList2._syncRoot;
273 if (syncRoot2 != null)
274 {
275 }
276 bool flag2;
277 return flag2;
278 }
279
280 // Token: 0x06000B74 RID: 2932 RVA: 0x000258A8 File Offset: 0x00023AA8
282 {
283 if (regexToCheck != null)
284 {
285 }
286 string text2;
287 string text = global::System.Text.RegularExpressions.Regex.Escape(text2);
288 string text3 = global::System.Text.RegularExpressions.Regex.Escape(text2);
289 int num;
290 while (num != 0)
291 {
292 }
293 long num2 = 0L;
294 if (regexToCheck != null)
295 {
296 }
297 if (num2 == 0L)
298 {
299 }
300 throw new OutOfMemoryException();
301 }
302
303 // Token: 0x06000B75 RID: 2933 RVA: 0x000258F0 File Offset: 0x00023AF0
304 public override IPermission Union(IPermission target)
305 {
306 if (target == null || this.m_noRestriction)
307 {
308 }
310 if (unrestrictedConnect || unrestrictedConnect)
311 {
312 int num = 1;
315 if (!unrestrictedAccept && !unrestrictedAccept)
316 {
317 goto IL_0045;
318 }
319 int num2 = 1;
321 }
322 if (this == null)
323 {
325 if (this.m_connectList != null)
326 {
327 }
328 if (this.m_connectList != null)
329 {
330 }
331 long num3 = 0L;
333 if (num3 == 0L || connectList2 != null)
334 {
335 }
336 if (connectList2 != null)
337 {
338 }
340 goto IL_008F;
341 }
342 this.m_connectList = this;
343 IL_0045:
344 if (this != null)
345 {
346 this.m_acceptList = this;
347 throw new InvalidCastException();
348 }
349 IL_008F:
351 if (this.m_acceptList != null)
352 {
353 }
354 if (this.m_acceptList != null)
355 {
356 }
357 long num4 = 0L;
359 if (num4 == 0L || acceptList2 != null)
360 {
361 }
362 if (acceptList2 != null)
363 {
364 }
366 string @string = SR.GetString("Cannot cast target permission type.");
367 throw new InvalidCastException();
368 }
369
370 // Token: 0x06000B76 RID: 2934 RVA: 0x000259D8 File Offset: 0x00023BD8
371 public override IPermission Intersect(IPermission target)
372 {
373 /*
374An exception occurred when decompiling this method (06000B76)
375
376ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Security.IPermission System.Net.WebPermission::Intersect(System.Security.IPermission)
377
378 ---> System.Exception: Basic block has to end with unconditional control flow.
379{
380 IL_0094:
381 stloc:string(var_8_9E, call:string(SR::GetString, ldstr:string("Cannot cast target permission type.")))
382}
383
384 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
385 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
386 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
387 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
388 --- End of inner exception stack trace ---
389 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
390 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
391*/;
392 }
393
394 // Token: 0x06000B77 RID: 2935 RVA: 0x00025A84 File Offset: 0x00023C84
396 {
397 if (securityElement == null)
398 {
399 return;
400 }
401 bool flag = securityElement.tag.Equals("IPermission");
402 if (securityElement.Attribute("class") == null)
403 {
404 return;
405 }
406 Type type = base.GetType();
407 int num;
408 if (securityElement.Attribute("Unrestricted") != null && num == 0)
409 {
410 int num2 = 1;
412 return;
413 }
415 if (securityElement2 != null)
416 {
417 ArrayList children = securityElement2.children;
418 return;
419 }
421 if (securityElement3 != null)
422 {
424 return;
425 }
426 }
427
428 // Token: 0x06000B78 RID: 2936 RVA: 0x00025C18 File Offset: 0x00023E18
429 public override SecurityElement ToXml()
430 {
431 Type type = base.GetType();
433 if (this.m_noRestriction)
434 {
435 }
436 if (!this.m_UnrestrictedConnect)
437 {
439 }
441 if (unrestrictedConnect)
442 {
444 {
445 }
446 string text = SecurityElement.Escape(".*");
447 if (!this.m_UnrestrictedAccept)
448 {
450 }
452 if (!unrestrictedAccept)
453 {
454 goto IL_0097;
455 }
457 {
458 }
459 string text2 = SecurityElement.Escape(".*");
460 }
461 if ("true" != null)
462 {
463 }
464 if ("true" != null)
465 {
466 }
467 string text4;
468 string text3 = global::System.Text.RegularExpressions.Regex.Escape(text4);
469 string text6;
471 IL_0097:
472 string text8;
474 long num = 0L;
475 int num2 = 15;
476 if (num2 == 0)
477 {
478 long value = num.m_value;
479 if (num != 0L)
480 {
481 throw new OutOfMemoryException();
482 }
483 while (num2 == 0)
484 {
485 }
486 }
487 throw new OutOfMemoryException();
488 }
489
490 // Token: 0x06000B79 RID: 2937 RVA: 0x00025D10 File Offset: 0x00023F10
491 private static bool isMatchedURI(object uriToCheck, ArrayList uriPatternList)
492 {
493 string text2;
494 global::System.Text.RegularExpressions.Match match2;
495 do
496 {
497 long num = 0L;
498 if (uriToCheck != null)
499 {
500 }
501 Type type = uriToCheck.GetType();
503 bool flag = type == type2;
504 if (num != 0L)
505 {
506 if (uriToCheck != null)
507 {
508 }
509 int num2;
510 while (num2 != 0)
511 {
512 }
513 }
514 if (num == 0L)
515 {
516 }
517 global::System.Text.RegularExpressions.Regex regex;
518 string text;
519 global::System.Text.RegularExpressions.Match match = regex.Match(text);
520 if (match != null && match.<Index>k__BackingField == 0)
521 {
522 int <Length>k__BackingField = match.<Length>k__BackingField;
523 int stringLength = text._stringLength;
524 }
525 while (num != 0L)
526 {
527 }
528 global::System.Text.RegularExpressions.Regex regex2;
529 match2 = regex2.Match(text2);
530 while (match2 == null)
531 {
532 }
533 }
534 while (match2.<Index>k__BackingField != 0);
535 int <Length>k__BackingField2 = match2.<Length>k__BackingField;
536 int stringLength2 = text2._stringLength;
537 long num3 = 0L;
538 if (uriToCheck == null || stringLength2 != 0)
539 {
540 }
541 if (num3 == 0L)
542 {
543 throw new InvalidCastException();
544 }
545 throw new OutOfMemoryException();
546 }
547
548 // Token: 0x06000B7A RID: 2938 RVA: 0x00025DDC File Offset: 0x00023FDC
549 private static void intersectList(ArrayList A, ArrayList B, ArrayList result)
550 {
551 }
552
553 // Token: 0x06000B7B RID: 2939 RVA: 0x00025F6C File Offset: 0x0002416C
554 private static object intersectPair(object L, object R, [Out] bool isUri)
555 {
556 long num = 0L;
557 if (L == null)
558 {
559 return "(?=(";
560 }
561 long num2 = 0L;
562 if (true)
563 {
564 if (L != null)
565 {
566 }
567 global::System.Text.RegularExpressions.Match match;
568 if (match == null || match.<Index>k__BackingField != 0)
569 {
570 goto IL_00A9;
571 }
572 int <Length>k__BackingField = match.<Length>k__BackingField;
573 }
574 if (L != null)
575 {
576 }
577 long num3 = 0L;
578 while (num2 == 0L)
579 {
580 }
581 while (num == 0L)
582 {
583 }
584 if (("(?=(" == null || "(?=(" != null) && (num == 0L || num != 0L) && ("))(" == null || "))(" != null) && (num2 == 0L || num2 != 0L) && (")" == null || ")" != null))
585 {
586 string text;
587 if (num3 == 0L || text != null)
588 {
589 }
590 global::System.Text.RegularExpressions.Regex regex;
591 global::System.Text.RegularExpressions.Match match2 = regex.Match(text);
592 if (match2 != null && match2.<Index>k__BackingField == 0)
593 {
594 int <Length>k__BackingField2 = match2.<Length>k__BackingField;
595 int stringLength = text._stringLength;
596 }
597 }
598 IL_00A9:
599 throw new ArrayTypeMismatchException();
600 }
601
602 // Token: 0x040009EF RID: 2543
603 private bool m_noRestriction;
604
605 // Token: 0x040009F0 RID: 2544
608
609 // Token: 0x040009F1 RID: 2545
612
613 // Token: 0x040009F2 RID: 2546
615
616 // Token: 0x040009F3 RID: 2547
618
619 // Token: 0x040009F4 RID: 2548
620 internal const string MatchAll = ".*";
621
622 // Token: 0x040009F5 RID: 2549
623 private static global::System.Text.RegularExpressions.Regex s_MatchAllRegex;
624 }
625}
class f__AnonymousType0<< Count > j__TPar
static string GetString(string name, params object[] args)
Definition SR.cs:9
Definition SR.cs:7
WebPermission(NetworkAccess access, global::System.Uri uri)
static void intersectList(ArrayList A, ArrayList B, ArrayList result)
void AddAsPattern(NetworkAccess access, DelayedRegex uriRegexPattern)
override bool IsSubsetOf(IPermission target)
void AddPermission(NetworkAccess access, global::System.Text.RegularExpressions.Regex uriRegex)
static global::System.Text.RegularExpressions.Regex s_MatchAllRegex
void AddPermission(NetworkAccess access, global::System.Uri uri)
static bool isMatchedURI(object uriToCheck, ArrayList uriPatternList)
static object intersectPair(object L, object R, [Out] bool isUri)
WebPermission(bool unrestricted)
override IPermission Copy()
void AddPermission(NetworkAccess access, string uriString)
override IPermission Intersect(IPermission target)
override IPermission Union(IPermission target)
WebPermission(NetworkAccess access, global::System.Text.RegularExpressions.Regex uriRegex)
WebPermission(PermissionState state)
override void FromXml(SecurityElement securityElement)
static global::System.Text.RegularExpressions.Regex MatchAllRegex
static bool isSpecialSubsetCase(string regexToCheck, ArrayList permList)
WebPermission(NetworkAccess access, string uriString)
override SecurityElement ToXml()
WebPermission(NetworkAccess access)
static string Escape(string str)
SecurityElement SearchForChildByTag(string tag)
new Type GetType()
Definition Type.cs:287