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
TypeInstanceCollection.cs
Go to the documentation of this file.
1using System;
3
4namespace ReLogic.Utilities
5{
6 // Token: 0x02000B0C RID: 2828
7 internal class TypeInstanceCollection<BaseType> : IDisposable where BaseType : class
8 {
9 // Token: 0x060052B0 RID: 21168 RVA: 0x00283524 File Offset: 0x00281724
10 public void Register<T>(T instance) where T : BaseType
11 {
12 Dictionary services = this._services;
13 if (instance != null && instance == null)
14 {
15 throw new InvalidCastException();
16 }
17 }
18
19 // Token: 0x060052B1 RID: 21169 RVA: 0x00283544 File Offset: 0x00281744
20 public T Get<T>() where T : BaseType
21 {
22 Dictionary services;
23 do
24 {
25 services = this._services;
26 if (services == null)
27 {
28 return;
29 }
30 }
31 while (services != null);
32 throw new InvalidCastException();
33 }
34
35 // Token: 0x060052B2 RID: 21170 RVA: 0x00283568 File Offset: 0x00281768
36 public void Remove<T>() where T : BaseType
37 {
38 Dictionary services = this._services;
39 }
40
41 // Token: 0x060052B3 RID: 21171 RVA: 0x0028357C File Offset: 0x0028177C
42 public bool Has<T>() where T : BaseType
43 {
44 /*
45An exception occurred when decompiling this method (060052B3)
46
47ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean ReLogic.Utilities.TypeInstanceCollection`1::Has<T>()
48
49 ---> System.Exception: Basic block has to end with unconditional control flow.
50{
51 Block_0:
52 stloc:Dictionary`2(var_0_06, ldfld:class [mscorlib]System.Collections.Generic.Dictionary`2<class [mscorlib]System.Type, !BaseType>[exp:Dictionary`2](TypeInstanceCollection`1::_services, ldloc:TypeInstanceCollection`1(this)))
53}
54
55 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
56 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
57 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
58 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
59 --- End of inner exception stack trace ---
60 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
61 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
62*/;
63 }
64
65 // Token: 0x060052B4 RID: 21172 RVA: 0x00283590 File Offset: 0x00281790
66 public bool Has(Type type)
67 {
68 /*
69An exception occurred when decompiling this method (060052B4)
70
71ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean ReLogic.Utilities.TypeInstanceCollection`1::Has(System.Type)
72
73 ---> System.Exception: Basic block has to end with unconditional control flow.
74{
75 Block_0:
76 stloc:Dictionary`2(var_0_06, ldfld:class [mscorlib]System.Collections.Generic.Dictionary`2<class [mscorlib]System.Type, !BaseType>[exp:Dictionary`2](TypeInstanceCollection`1::_services, ldloc:TypeInstanceCollection`1(this)))
77}
78
79 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
80 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
81 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
82 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
83 --- End of inner exception stack trace ---
84 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
85 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
86*/;
87 }
88
89 // Token: 0x060052B5 RID: 21173 RVA: 0x002835A4 File Offset: 0x002817A4
90 public void IfHas<T>(Action<T> callback) where T : BaseType
91 {
92 Dictionary services = this._services;
93 if (services != null && services == null)
94 {
95 throw new InvalidCastException();
96 }
97 }
98
99 // Token: 0x060052B6 RID: 21174 RVA: 0x002835C4 File Offset: 0x002817C4
100 public U IfHas<U, T>(Func<T, U> callback) where T : BaseType
101 {
102 Dictionary services;
103 do
104 {
105 services = this._services;
106 Dictionary.Entry[] entries = services._entries;
107 }
108 while (services == null || services != null);
109 throw new InvalidCastException();
110 }
111
112 // Token: 0x060052B7 RID: 21175 RVA: 0x002835EC File Offset: 0x002817EC
113 protected virtual void Dispose(bool disposing)
114 {
115 while (!this._disposedValue)
116 {
117 if (this._services != null)
118 {
119 return;
120 }
121 }
122 }
123
124 // Token: 0x060052B8 RID: 21176 RVA: 0x0028363C File Offset: 0x0028183C
125 public void Dispose()
126 {
127 }
128
129 // Token: 0x060052B9 RID: 21177 RVA: 0x0028364C File Offset: 0x0028184C
131 {
132 this._services = this;
133 base..ctor();
134 }
135
136 // Token: 0x04008ADE RID: 35550
138
139 // Token: 0x04008ADF RID: 35551
140 private bool _disposedValue;
141 }
142}
class f__AnonymousType0<< Count > j__TPar
Dictionary< TKey, TValue >.Entry[] _entries