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
SecurityElement.cs
Go to the documentation of this file.
1using System;
4using System.Text;
6
7namespace System.Security
8{
9 // Token: 0x0200029A RID: 666
10 [ComVisible(true)]
12 public sealed class SecurityElement
13 {
14 // Token: 0x06001700 RID: 5888 RVA: 0x0003077C File Offset: 0x0002E97C
15 public SecurityElement(string tag)
16 {
17 }
18
19 // Token: 0x06001701 RID: 5889 RVA: 0x0003078C File Offset: 0x0002E98C
20 public SecurityElement(string tag, string text)
21 {
22 /*
23An exception occurred when decompiling this method (06001701)
24
25ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void System.Security.SecurityElement::.ctor(System.String,System.String)
26
27 ---> System.Exception: Basic block has to end with unconditional control flow.
28{
29 IL_001F:
30 stloc:string(var_1_29, call:string(Locale::GetText, ldstr:string("Invalid XML string")))
31}
32
33 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
34 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
35 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
36 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
37 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
38 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
39 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
40 --- End of inner exception stack trace ---
41 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
42 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
43*/;
44 }
45
46 // Token: 0x17000251 RID: 593
47 // (get) Token: 0x06001702 RID: 5890 RVA: 0x000307C4 File Offset: 0x0002E9C4
49 {
50 get
51 {
52 long num;
53 if (this.attributes != null)
54 {
56 if (arrayList != null)
57 {
58 }
59 object[] items = arrayList._items;
60 int size = arrayList._size;
61 num = 0L;
62 if (arrayList != null)
63 {
64 }
65 }
66 if (num == 0L)
67 {
68 throw new InvalidCastException();
69 }
70 throw new OutOfMemoryException();
71 }
72 }
73
74 // Token: 0x17000252 RID: 594
75 // (get) Token: 0x06001703 RID: 5891 RVA: 0x00030818 File Offset: 0x0002EA18
77 {
78 get
79 {
80 return this.children;
81 }
82 }
83
84 // Token: 0x17000253 RID: 595
85 // (get) Token: 0x06001704 RID: 5892 RVA: 0x0003082C File Offset: 0x0002EA2C
86 public string Tag
87 {
88 get
89 {
90 return this.tag;
91 }
92 }
93
94 // Token: 0x17000254 RID: 596
95 // (set) Token: 0x06001705 RID: 5893 RVA: 0x00030840 File Offset: 0x0002EA40
96 public string Text
97 {
98 set
99 {
100 if (value != null)
101 {
102 if (!true)
103 {
104 }
105 bool flag = SecurityElement.IsValidText(value);
106 }
107 if (!true)
108 {
109 }
111 this.text = text;
112 }
113 }
114
115 // Token: 0x06001706 RID: 5894 RVA: 0x00030884 File Offset: 0x0002EA84
116 public void AddAttribute(string name, string value)
117 {
118 /*
119An exception occurred when decompiling this method (06001706)
120
121ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void System.Security.SecurityElement::AddAttribute(System.String,System.String)
122
123 ---> System.Exception: Basic block has to end with unconditional control flow.
124{
125 IL_0019:
126 stloc:string(var_1_1F, call:string(Locale::GetText, ldloc:string(var_0)))
127}
128
129 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
130 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
131 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
132 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
133 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
134 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
135 at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
136 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
137 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
138 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
139 --- End of inner exception stack trace ---
140 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
141 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
142*/;
143 }
144
145 // Token: 0x06001707 RID: 5895 RVA: 0x000308B0 File Offset: 0x0002EAB0
146 public void AddChild(SecurityElement child)
147 {
148 while (child == null)
149 {
150 }
151 if (this.children == null)
152 {
153 }
154 }
155
156 // Token: 0x06001708 RID: 5896 RVA: 0x000308C8 File Offset: 0x0002EAC8
157 public string Attribute(string name)
158 {
160 for (;;)
161 {
162 if (name != null)
163 {
164 attribute = this.GetAttribute(name);
165 if (attribute != null)
166 {
167 break;
168 }
169 }
170 }
171 return attribute._value;
172 }
173
174 // Token: 0x06001709 RID: 5897 RVA: 0x000308EC File Offset: 0x0002EAEC
175 public static string Escape(string str)
176 {
177 if (!true)
178 {
179 return;
180 }
181 }
182
183 // Token: 0x0600170A RID: 5898 RVA: 0x00030900 File Offset: 0x0002EB00
184 private static string Unescape(string str)
185 {
186 }
187
188 // Token: 0x0600170B RID: 5899 RVA: 0x00030910 File Offset: 0x0002EB10
189 public static bool IsValidAttributeName(string name)
190 {
191 if (!true)
192 {
193 return;
194 }
195 }
196
197 // Token: 0x0600170C RID: 5900 RVA: 0x00030924 File Offset: 0x0002EB24
198 public static bool IsValidAttributeValue(string value)
199 {
200 if (!true)
201 {
202 return;
203 }
204 }
205
206 // Token: 0x0600170D RID: 5901 RVA: 0x00030938 File Offset: 0x0002EB38
207 public static bool IsValidTag(string tag)
208 {
209 if (!true)
210 {
211 return;
212 }
213 }
214
215 // Token: 0x0600170E RID: 5902 RVA: 0x0003094C File Offset: 0x0002EB4C
216 public static bool IsValidText(string text)
217 {
218 if (!true)
219 {
220 return;
221 }
222 }
223
224 // Token: 0x0600170F RID: 5903 RVA: 0x00030960 File Offset: 0x0002EB60
226 {
227 while (tag == null)
228 {
229 }
230 if (this.children != null)
231 {
233 if (arrayList != null)
234 {
235 }
236 int size = arrayList._size;
238 }
239 throw new InvalidCastException();
240 }
241
242 // Token: 0x06001710 RID: 5904 RVA: 0x0003099C File Offset: 0x0002EB9C
243 public string SearchForTextOfTag(string tag)
244 {
245 while (tag == null)
246 {
247 }
248 bool flag = this.tag == tag;
249 return this.text;
250 }
251
252 // Token: 0x06001711 RID: 5905 RVA: 0x0000207A File Offset: 0x0000027A
253 public override string ToString()
254 {
255 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
256 }
257
258 // Token: 0x06001712 RID: 5906 RVA: 0x000309E4 File Offset: 0x0002EBE4
259 private void ToXml(StringBuilder s, int level)
260 {
261 string text = this.tag;
262 if (this.attributes != null)
263 {
266 if (arrayList2 != null)
267 {
268 }
269 object[] items = arrayList2._items;
271 StringBuilder stringBuilder = stringBuilder2.Append("=\"");
272 int size = arrayList2._size;
273 string text2;
274 StringBuilder stringBuilder3 = stringBuilder.Append(text2).Append("\"");
276 string newLine = Environment.NewLine;
278 }
279 if (this.text != null)
280 {
281 }
283 if (arrayList5 == null || arrayList5 == null)
284 {
285 return;
286 }
287 string text3 = SecurityElement.Escape(this.text);
290 if (this.children != null)
291 {
294 return;
295 }
296 string text4 = this.tag;
301 }
302
303 // Token: 0x06001713 RID: 5907 RVA: 0x00030B28 File Offset: 0x0002ED28
305 {
307 if (arrayList != null)
308 {
309 if (arrayList != null)
310 {
311 }
312 object[] items = arrayList._items;
313 long num = 0L;
314 if (arrayList != null)
315 {
316 }
317 if (num != 0L)
318 {
319 throw new OutOfMemoryException();
320 }
321 }
322 throw new InvalidCastException();
323 }
324
325 // Token: 0x17000255 RID: 597
326 // (set) Token: 0x06001714 RID: 5908 RVA: 0x00030B70 File Offset: 0x0002ED70
327 internal string m_strText
328 {
329 set
330 {
332 }
333 }
334
335 // Token: 0x06001715 RID: 5909 RVA: 0x00030B84 File Offset: 0x0002ED84
337 {
338 if (strLocalName != null)
339 {
340 string text = this.tag;
341 if (text != null)
342 {
343 bool flag = text.Equals(strLocalName);
344 string text2 = this.tag;
345 string text3 = ":" + strLocalName;
346 string text4 = this.text;
347 if (":" == null)
348 {
349 }
351 }
352 }
353 throw new InvalidCastException();
354 }
355
356 // Token: 0x06001716 RID: 5910 RVA: 0x00030BF0 File Offset: 0x0002EDF0
357 // Note: this type is marked as 'beforefieldinit'.
359 {
360 }
361
362 // Token: 0x04000BA6 RID: 2982
363 private string text;
364
365 // Token: 0x04000BA7 RID: 2983
366 private string tag;
367
368 // Token: 0x04000BA8 RID: 2984
370
371 // Token: 0x04000BA9 RID: 2985
373
374 // Token: 0x04000BAA RID: 2986
375 private static readonly char[] invalid_tag_chars;
376
377 // Token: 0x04000BAB RID: 2987
378 private static readonly char[] invalid_text_chars;
379
380 // Token: 0x04000BAC RID: 2988
381 private static readonly char[] invalid_attr_name_chars;
382
383 // Token: 0x04000BAD RID: 2989
384 private static readonly char[] invalid_attr_value_chars;
385
386 // Token: 0x04000BAE RID: 2990
387 private static readonly char[] invalid_chars;
388
389 // Token: 0x0200029B RID: 667
390 internal class SecurityAttribute
391 {
392 // Token: 0x06001717 RID: 5911 RVA: 0x00030C00 File Offset: 0x0002EE00
393 public SecurityAttribute(string name, string value)
394 {
395 if (!true)
396 {
397 }
399 if (!true)
400 {
401 }
404 if (!true)
405 {
406 }
409 }
410
411 // Token: 0x17000256 RID: 598
412 // (get) Token: 0x06001718 RID: 5912 RVA: 0x00030C64 File Offset: 0x0002EE64
413 public string Name
414 {
415 get
416 {
417 return this._name;
418 }
419 }
420
421 // Token: 0x17000257 RID: 599
422 // (get) Token: 0x06001719 RID: 5913 RVA: 0x00030C78 File Offset: 0x0002EE78
423 public string Value
424 {
425 get
426 {
427 return this._value;
428 }
429 }
430
431 // Token: 0x04000BAF RID: 2991
432 private string _name;
433
434 // Token: 0x04000BB0 RID: 2992
435 private string _value;
436 }
437 }
438}
class f__AnonymousType0<< Count > j__TPar
static string NewLine
static string Unescape(string str)
static bool IsValidAttributeName(string name)
static readonly char[] invalid_chars
static string Escape(string str)
static readonly char[] invalid_tag_chars
SecurityElement.SecurityAttribute GetAttribute(string name)
string SearchForTextOfLocalName(string strLocalName)
SecurityElement SearchForChildByTag(string tag)
static bool IsValidAttributeValue(string value)
static readonly char[] invalid_text_chars
static readonly char[] invalid_attr_value_chars
SecurityElement(string tag, string text)
string SearchForTextOfTag(string tag)
static bool IsValidText(string text)
void ToXml(StringBuilder s, int level)
static readonly char[] invalid_attr_name_chars
void AddAttribute(string name, string value)
static bool IsValidTag(string tag)
void AddChild(SecurityElement child)
StringBuilder Append(char value, int repeatCount)