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
XContainer.cs
Go to the documentation of this file.
1using System;
6using System.Text;
8
9namespace System.Xml.Linq
10{
11 // Token: 0x02000006 RID: 6
12 public abstract class XContainer : XNode
13 {
14 // Token: 0x06000018 RID: 24 RVA: 0x00002414 File Offset: 0x00000614
15 internal XContainer()
16 {
17 }
18
19 // Token: 0x06000019 RID: 25 RVA: 0x00002428 File Offset: 0x00000628
21 {
22 if (other == null)
23 {
24 throw new InvalidCastException();
25 }
26 object obj = other.content;
27 if (obj != null)
28 {
29 object obj2 = other.content;
30 return;
31 }
32 }
33
34 // Token: 0x17000008 RID: 8
35 // (get) Token: 0x0600001A RID: 26 RVA: 0x00002460 File Offset: 0x00000660
37 {
38 get
39 {
40 do
41 {
42 if (this.content != null)
43 {
44 }
45 }
46 while (this.content == null);
47 throw new InvalidCastException();
48 }
49 }
50
51 // Token: 0x0600001B RID: 27 RVA: 0x00002484 File Offset: 0x00000684
52 public void Add(object content)
53 {
54 bool flag = base.SkipNotify();
55 this.AddContentSkipNotify(content);
56 }
57
58 // Token: 0x0600001C RID: 28 RVA: 0x000024DC File Offset: 0x000006DC
60 {
61 /*
62An exception occurred when decompiling this method (0600001C)
63
64ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.Generic.IEnumerable`1<System.Xml.Linq.XNode> System.Xml.Linq.XContainer::Nodes()
65
66 ---> System.Exception: Basic block has to end with unconditional control flow.
67{
68 Block_0:
69 stloc:int32(var_1_07, callgetter:int32(Environment::get_CurrentManagedThreadId))
70}
71
72 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
73 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
74 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
75 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
76 --- End of inner exception stack trace ---
77 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
78 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
79*/;
80 }
81
82 // Token: 0x0600001D RID: 29 RVA: 0x000024F0 File Offset: 0x000006F0
83 public void RemoveNodes()
84 {
85 bool flag = base.SkipNotify();
87 }
88
89 // Token: 0x0600001E RID: 30 RVA: 0x00002544 File Offset: 0x00000744
90 internal virtual void AddAttribute(XAttribute a)
91 {
92 }
93
94 // Token: 0x0600001F RID: 31 RVA: 0x00002554 File Offset: 0x00000754
95 internal virtual void AddAttributeSkipNotify(XAttribute a)
96 {
97 }
98
99 // Token: 0x06000020 RID: 32 RVA: 0x00002564 File Offset: 0x00000764
100 internal void AddContentSkipNotify(object content)
101 {
102 if (content == null)
103 {
104 return;
105 }
106 long num;
107 if (content != null)
108 {
109 num = 0L;
110 return;
111 }
112 if (num != 0L)
113 {
114 return;
115 }
116 string stringValue = XContainer.GetStringValue(num);
117 }
118
119 // Token: 0x06000021 RID: 33 RVA: 0x000025AC File Offset: 0x000007AC
120 internal void AddNode(XNode n)
121 {
122 if (n.parent != null)
123 {
124 return;
125 }
126 if (this.parent != null)
127 {
128 return;
129 }
130 this.ConvertTextToNode();
131 this.AppendNode(n);
132 }
133
134 // Token: 0x06000022 RID: 34 RVA: 0x000025D8 File Offset: 0x000007D8
135 internal void AddNodeSkipNotify(XNode n)
136 {
137 while (n.parent == null)
138 {
139 if (this.parent == null)
140 {
141 this.ConvertTextToNode();
142 this.AppendNodeSkipNotify(n);
143 return;
144 }
145 if (this.parent == null)
146 {
147 return;
148 }
149 }
150 }
151
152 // Token: 0x06000023 RID: 35 RVA: 0x0000260C File Offset: 0x0000080C
153 internal void AddString(string s)
154 {
155 int stringLength = s._stringLength;
156 if (this.content != null)
157 {
158 this.ConvertTextToNode();
159 if (this.content != null)
160 {
161 return;
162 }
163 }
164 }
165
166 // Token: 0x06000024 RID: 36 RVA: 0x00002654 File Offset: 0x00000854
167 internal void AddStringSkipNotify(string s)
168 {
169 if (this.content != null)
170 {
171 int stringLength = s._stringLength;
172 return;
173 }
174 this.content = s;
175 }
176
177 // Token: 0x06000025 RID: 37 RVA: 0x0000268C File Offset: 0x0000088C
178 internal void AppendNode(XNode n)
179 {
181 do
182 {
183 if (!true)
184 {
185 }
186 parent = n.parent;
187 }
188 while (parent != null);
189 this.AppendNodeSkipNotify(n);
190 if (parent == null)
191 {
192 }
193 }
194
195 // Token: 0x06000026 RID: 38 RVA: 0x000026B4 File Offset: 0x000008B4
197 {
198 n.parent = this;
199 if (this.content != null)
200 {
201 return;
202 }
203 this.content = n;
204 }
205
206 // Token: 0x06000027 RID: 39 RVA: 0x000026E0 File Offset: 0x000008E0
207 internal override void AppendText(StringBuilder sb)
208 {
209 if (this.content != null)
210 {
211 object obj = this.content;
212 }
213 }
214
215 // Token: 0x06000028 RID: 40 RVA: 0x00002704 File Offset: 0x00000904
216 internal void ConvertTextToNode()
217 {
218 if (this.content != null)
219 {
220 return;
221 }
222 }
223
224 // Token: 0x06000029 RID: 41 RVA: 0x0000271C File Offset: 0x0000091C
225 internal static string GetStringValue(object value)
226 {
227 return XmlConvert.ToString((double)16777216);
228 }
229
230 // Token: 0x0600002A RID: 42 RVA: 0x00002794 File Offset: 0x00000994
231 internal void RemoveNode(XNode n)
232 {
233 if (!true)
234 {
235 }
237 object obj = this.content;
238 if (obj != null)
239 {
240 }
241 }
242
243 // Token: 0x0600002B RID: 43 RVA: 0x000027D0 File Offset: 0x000009D0
245 {
246 if (this.content != null)
247 {
248 }
249 }
250
251 // Token: 0x0600002C RID: 44 RVA: 0x000027E8 File Offset: 0x000009E8
252 internal virtual void ValidateNode(XNode node, XNode previous)
253 {
254 }
255
256 // Token: 0x0600002D RID: 45 RVA: 0x000027F8 File Offset: 0x000009F8
257 internal virtual void ValidateString(string s)
258 {
259 }
260
261 // Token: 0x0600002E RID: 46 RVA: 0x00002808 File Offset: 0x00000A08
262 internal void WriteContentTo(XmlWriter writer)
263 {
264 if (this.content != null)
265 {
266 object obj = this.content;
267 }
268 }
269
270 // Token: 0x04000005 RID: 5
271 internal object content;
272
273 // Token: 0x02000007 RID: 7
276 {
277 // Token: 0x0600002F RID: 47 RVA: 0x0000282C File Offset: 0x00000A2C
280 {
281 this.<>1__state = <>1__state;
283 this.<>l__initialThreadId = currentManagedThreadId;
284 }
285
286 // Token: 0x06000030 RID: 48 RVA: 0x00002858 File Offset: 0x00000A58
288 void IDisposable.Dispose()
289 {
290 }
291
292 // Token: 0x06000031 RID: 49 RVA: 0x00002868 File Offset: 0x00000A68
293 private bool MoveNext()
294 {
295 int num = this.<>1__state;
296 XContainer xcontainer = this.<>4__this;
297 if (num == 0)
298 {
299 this.<>1__state = num;
300 XNode lastNode = xcontainer.LastNode;
301 this.<n>5__2 = lastNode;
302 XNode xnode;
303 if (lastNode == null)
304 {
305 xnode = this.<n>5__2;
307 }
309 this.<>1__state = 1;
310 this.<n>5__2 = next;
311 this.<>2__current = next;
312 return true;
313 }
314 }
315
316 // Token: 0x17000009 RID: 9
317 // (get) Token: 0x06000032 RID: 50 RVA: 0x000028D0 File Offset: 0x00000AD0
319 {
321 get
322 {
323 return this.<>2__current;
324 }
325 }
326
327 // Token: 0x06000033 RID: 51 RVA: 0x00002367 File Offset: 0x00000567
329 void IEnumerator.Reset()
330 {
331 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
332 }
333
334 // Token: 0x1700000A RID: 10
335 // (get) Token: 0x06000034 RID: 52 RVA: 0x000028E4 File Offset: 0x00000AE4
337 {
339 get
340 {
341 /*
342An exception occurred when decompiling this method (06000034)
343
344ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Object System.Xml.Linq.XContainer/<Nodes>d__18::System.Collections.IEnumerator.get_Current()
345
346 ---> System.Exception: Basic block has to end with unconditional control flow.
347{
348 Block_0:
349 stloc:XNode(var_0_06, ldfld:XNode('<Nodes>d__18'::<>2__current, ldloc:'<Nodes>d__18'(this)))
350}
351
352 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
353 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
354 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
355 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
356 --- End of inner exception stack trace ---
357 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
358 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
359*/;
360 }
361 }
362
363 // Token: 0x06000035 RID: 53 RVA: 0x000028F8 File Offset: 0x00000AF8
366 {
367 /*
368An exception occurred when decompiling this method (06000035)
369
370ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.Generic.IEnumerator`1<System.Xml.Linq.XNode> System.Xml.Linq.XContainer/<Nodes>d__18::System.Collections.Generic.IEnumerable<System.Xml.Linq.XNode>.GetEnumerator()
371
372 ---> System.Exception: Basic block has to end with unconditional control flow.
373{
374 Block_0:
375 stloc:int32(var_0_06, ldfld:int32('<Nodes>d__18'::<>1__state, ldloc:'<Nodes>d__18'(this)))
376 stloc:int32(var_1_0D, ldfld:int32('<Nodes>d__18'::<>l__initialThreadId, ldloc:'<Nodes>d__18'(this)))
377 stloc:int32(var_3_15, callgetter:int32(Environment::get_CurrentManagedThreadId))
378 stloc:int32(var_5_1E, callgetter:int32(Environment::get_CurrentManagedThreadId))
379 stloc:XContainer(var_6_26, ldfld:XContainer('<Nodes>d__18'::<>4__this, ldloc:'<Nodes>d__18'(this)))
380}
381
382 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
383 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
384 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
385 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
386 --- End of inner exception stack trace ---
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 92
388 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
389*/;
390 }
391
392 // Token: 0x06000036 RID: 54 RVA: 0x0000292C File Offset: 0x00000B2C
395 {
396 /*
397An exception occurred when decompiling this method (06000036)
398
399ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Collections.IEnumerator System.Xml.Linq.XContainer/<Nodes>d__18::System.Collections.IEnumerable.GetEnumerator()
400
401 ---> System.Exception: Basic block has to end with unconditional control flow.
402{
403 Block_0:
404 stloc:class [mscorlib]System.Collections.Generic.IEnumerator`1<class System.Xml.Linq.XNode>(var_0_06, call:IEnumerator`1[exp:class [mscorlib]System.Collections.Generic.IEnumerator`1<class System.Xml.Linq.XNode>]('<Nodes>d__18'::System.Collections.Generic.IEnumerable<System.Xml.Linq.XNode>.GetEnumerator, ldloc:'<Nodes>d__18'(this)))
405}
406
407 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
408 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
409 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
410 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
411 --- End of inner exception stack trace ---
412 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
413 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
414*/;
415 }
416
417 // Token: 0x04000006 RID: 6
418 private int <>1__state;
419
420 // Token: 0x04000007 RID: 7
421 private XNode <>2__current;
422
423 // Token: 0x04000008 RID: 8
424 private int <>l__initialThreadId;
425
426 // Token: 0x04000009 RID: 9
427 public XContainer <>4__this;
428
429 // Token: 0x0400000A RID: 10
430 private XNode <n>5__2;
431 }
432 }
433}
class f__AnonymousType0<< Count > j__TPar
static int CurrentManagedThreadId
IEnumerable< XNode > Nodes()
Definition XContainer.cs:59
void AddContentSkipNotify(object content)
virtual void ValidateNode(XNode node, XNode previous)
void AddNodeSkipNotify(XNode n)
void AddStringSkipNotify(string s)
virtual void AddAttribute(XAttribute a)
Definition XContainer.cs:90
virtual void ValidateString(string s)
void Add(object content)
Definition XContainer.cs:52
class< Nodes > IEnumerable
static string GetStringValue(object value)
XContainer(XContainer other)
Definition XContainer.cs:20
class< Nodes > IDisposable
virtual void AddAttributeSkipNotify(XAttribute a)
Definition XContainer.cs:95
void AppendNodeSkipNotify(XNode n)
void WriteContentTo(XmlWriter writer)
override void AppendText(StringBuilder sb)
static string ToString(bool value)