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
WriteObjectInfo.cs
Go to the documentation of this file.
1using System;
5
7{
8 // Token: 0x02000419 RID: 1049
9 internal sealed class WriteObjectInfo
10 {
11 // Token: 0x0600207E RID: 8318 RVA: 0x00047B20 File Offset: 0x00045D20
12 internal WriteObjectInfo()
13 {
14 }
15
16 // Token: 0x0600207F RID: 8319 RVA: 0x00047B34 File Offset: 0x00045D34
17 internal void ObjectEnd()
18 {
19 this.serObjectInfoInit.oiPool.Push(this);
20 }
21
22 // Token: 0x06002080 RID: 8320 RVA: 0x00047B54 File Offset: 0x00045D54
23 private void InternalInit()
24 {
25 }
26
27 // Token: 0x06002081 RID: 8321 RVA: 0x00047B64 File Offset: 0x00045D64
32
33 // Token: 0x06002082 RID: 8322 RVA: 0x00047B78 File Offset: 0x00045D78
47
48 // Token: 0x06002083 RID: 8323 RVA: 0x00047C98 File Offset: 0x00045E98
53
54 // Token: 0x06002084 RID: 8324 RVA: 0x00047CAC File Offset: 0x00045EAC
64
65 // Token: 0x06002085 RID: 8325 RVA: 0x00047D58 File Offset: 0x00045F58
66 private void InitSiWrite()
67 {
69 int num = 1;
70 this.isSi = num != 0;
71 SerializationInfoEnumerator enumerator = serializationInfo.GetEnumerator();
73 int currMember = serializationInfo2.m_currMember;
74 bool isFullTypeNameSetExplicit = serializationInfo2.isFullTypeNameSetExplicit;
75 string assemName = serializationInfo2.m_assemName;
76 if (isFullTypeNameSetExplicit)
77 {
78 return;
79 }
80 Type type = serializationInfo2.objectType;
81 if (!isFullTypeNameSetExplicit)
82 {
83 }
85 bool hasTypeForwardedFrom = typeInformation.hasTypeForwardedFrom;
87 if (!serializationInfo3.isAssemblyNameSetExplicit)
88 {
90 if (typeInformation == null)
91 {
92 Type type2 = serializationInfo3.objectType;
93 if (!isFullTypeNameSetExplicit)
94 {
95 }
97 }
99 string assemblyString = typeInformation2.assemblyString;
100 }
103 int numItems = enumerator2._numItems;
104 bool current = enumerator2._current;
105 int num2 = 1;
106 enumerator2._currItem = (current ? 1 : 0);
108 string[] memberNames = this.cache.memberNames;
109 string name = enumerator2.Name;
110 if (name == null || name != null)
111 {
112 Type[] memberTypes = this.cache.memberTypes;
113 Type type3 = enumerator2.ObjectType;
114 if (type3 == null || type3 != null)
115 {
116 object[] array = this.memberData;
117 object value = enumerator2.Value;
118 if (value == null || value != null)
119 {
120 int numItems2 = enumerator2._numItems;
121 bool current2 = enumerator2._current;
122 return;
123 }
124 }
125 }
126 throw new ArrayTypeMismatchException();
127 }
128
129 // Token: 0x06002086 RID: 8326 RVA: 0x00047EA4 File Offset: 0x000460A4
131 {
133 {
135 string assemblyString = cache.assemblyString;
136 }
137 }
138
139 // Token: 0x06002087 RID: 8327 RVA: 0x00047ED0 File Offset: 0x000460D0
140 private void InitNoMembers()
141 {
143 Type type = this.objectType;
145 if (seenBeforeTable != null)
146 {
147 this.cache = seenBeforeTable;
148 return;
149 }
150 Type type2 = this.objectType;
152 Type type3 = this.objectType;
154 }
155
156 // Token: 0x06002088 RID: 8328 RVA: 0x00047F24 File Offset: 0x00046124
157 private void InitMemberInfo()
158 {
160 Type type = this.objectType;
162 if (seenBeforeTable != null)
163 {
164 this.cache = seenBeforeTable;
165 throw new InvalidCastException();
166 }
167 object obj = this.obj;
168 Type type2 = this.objectType;
169 Type type3;
170 if (type3 == null || type3 != null)
171 {
173 Type type4 = this.objectType;
176 if (this.obj != null)
177 {
178 object[] array;
180 }
181 return;
182 }
183 throw new ArrayTypeMismatchException();
184 }
185
186 // Token: 0x06002089 RID: 8329 RVA: 0x00047FA4 File Offset: 0x000461A4
187 internal string GetTypeFullName()
188 {
189 string text = this.binderTypeName;
190 if (text != null)
191 {
192 return text;
193 }
194 return this.cache.fullTypeName;
195 }
196
197 // Token: 0x0600208A RID: 8330 RVA: 0x00047FC8 File Offset: 0x000461C8
198 internal string GetAssemblyString()
199 {
200 string text = this.binderAssemblyString;
201 if (text != null)
202 {
203 return text;
204 }
205 return this.cache.assemblyString;
206 }
207
208 // Token: 0x0600208B RID: 8331 RVA: 0x00047FEC File Offset: 0x000461EC
210 {
211 if (binder != null)
212 {
213 Type type = this.objectType;
214 return;
215 }
216 }
217
218 // Token: 0x0600208C RID: 8332 RVA: 0x00048004 File Offset: 0x00046204
220 {
221 if (objMember != null)
222 {
223 }
224 Type type = objMember.GetType();
225 throw new ArrayTypeMismatchException();
226 }
227
228 // Token: 0x0600208D RID: 8333 RVA: 0x00048024 File Offset: 0x00046224
229 internal void GetMemberInfo([Out] string[] outMemberNames, [Out] Type[] outMemberTypes, [Out] object[] outMemberData)
230 {
231 /*
232An exception occurred when decompiling this method (0600208D)
233
234ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo::GetMemberInfo(System.String[],System.Type[],System.Object[])
235
236 ---> System.Exception: Basic block has to end with unconditional control flow.
237{
238 IL_0030:
239 stloc:string(var_3_3A, call:string(Environment::GetResourceString, ldstr:string("MemberInfo requested for ISerializable type.")))
240}
241
242 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
243 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
244 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
245 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
246 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
247 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
248 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
249 --- End of inner exception stack trace ---
250 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
251 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
252*/;
253 }
254
255 // Token: 0x0600208E RID: 8334 RVA: 0x0004806C File Offset: 0x0004626C
257 {
258 object obj;
259 if (obj != null)
260 {
261 }
262 throw new InvalidCastException();
263 }
264
265 // Token: 0x0600208F RID: 8335 RVA: 0x00048084 File Offset: 0x00046284
267 {
268 serObjectInfoInit.oiPool.Push(objectInfo);
269 }
270
271 // Token: 0x0400110C RID: 4364
272 internal int objectInfoId;
273
274 // Token: 0x0400110D RID: 4365
275 internal object obj;
276
277 // Token: 0x0400110E RID: 4366
278 internal Type objectType;
279
280 // Token: 0x0400110F RID: 4367
281 internal bool isSi;
282
283 // Token: 0x04001110 RID: 4368
284 internal bool isNamed;
285
286 // Token: 0x04001111 RID: 4369
287 internal bool isTyped;
288
289 // Token: 0x04001112 RID: 4370
290 internal bool isArray;
291
292 // Token: 0x04001113 RID: 4371
294
295 // Token: 0x04001114 RID: 4372
297
298 // Token: 0x04001115 RID: 4373
299 internal object[] memberData;
300
301 // Token: 0x04001116 RID: 4374
303
304 // Token: 0x04001117 RID: 4375
306
307 // Token: 0x04001118 RID: 4376
309
310 // Token: 0x04001119 RID: 4377
311 internal long objectId;
312
313 // Token: 0x0400111A RID: 4378
314 internal long assemId;
315
316 // Token: 0x0400111B RID: 4379
317 private string binderTypeName;
318
319 // Token: 0x0400111C RID: 4380
320 private string binderAssemblyString;
321 }
322}
class f__AnonymousType0<< Count > j__TPar
static WriteObjectInfo Serialize(Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, SerializationBinder binder)
static WriteObjectInfo Serialize(object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
void GetMemberInfo([Out] string[] outMemberNames, [Out] Type[] outMemberTypes, [Out] object[] outMemberData)
void InitSerialize(object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
static void PutObjectInfo(SerObjectInfoInit serObjectInfoInit, WriteObjectInfo objectInfo)
static void CheckTypeForwardedFrom(SerObjectInfoCache cache, Type objectType, string binderAssemblyString)
static WriteObjectInfo GetObjectInfo(SerObjectInfoInit serObjectInfoInit)
void InitSerialize(Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, SerializationBinder binder)
bool IsArray
Definition Type.cs:356
new Type GetType()
Definition Type.cs:287