Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
JsonFormatGeneratorStatics.cs
Go to the documentation of this file.
5using System.Xml;
6
8
9public static class JsonFormatGeneratorStatics
10{
11 private static MethodInfo s_boxPointer;
12
14
16
18
20
22
24
26
28
30
32
34
36
38
40
42
44
46
48
50
51 private static Type[] s_serInfoCtorArgs;
52
54
56
58
59 private static MethodInfo s_unboxPointer;
60
62
64
66
68
70
72
74
76
78
80
82
83 public static MethodInfo BoxPointer
84 {
85 get
86 {
87 if (s_boxPointer == null)
88 {
89 s_boxPointer = typeof(Pointer).GetMethod("Box");
90 }
91 return s_boxPointer;
92 }
93 }
94
96 {
97 get
98 {
100 {
101 s_collectionItemNameProperty = typeof(XmlObjectSerializerWriteContextComplexJson).GetProperty("CollectionItemName", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
102 }
104 }
105 }
106
108
110
112 {
113 get
114 {
116 {
117 s_ienumeratorGetCurrentMethod = typeof(IEnumerator).GetProperty("Current").GetGetMethod();
118 }
120 }
121 }
122
124 {
125 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
126 get
127 {
128 if (s_getItemContractMethod == null)
129 {
130 s_getItemContractMethod = typeof(CollectionDataContract).GetProperty("ItemContract", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic).GetGetMethod(nonPublic: true);
131 }
133 }
134 }
135
137 {
138 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
139 get
140 {
141 if (s_getJsonDataContractMethod == null)
142 {
143 s_getJsonDataContractMethod = typeof(JsonDataContract).GetMethod("GetJsonDataContract", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
144 }
146 }
147 }
148
150 {
151 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
152 get
153 {
154 if (s_getJsonMemberIndexMethod == null)
155 {
156 s_getJsonMemberIndexMethod = typeof(XmlObjectSerializerReadContextComplexJson).GetMethod("GetJsonMemberIndex", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
157 }
159 }
160 }
161
163 {
164 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
165 get
166 {
168 {
169 s_getRevisedItemContractMethod = typeof(XmlObjectSerializerWriteContextComplexJson).GetMethod("GetRevisedItemContract", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
170 }
172 }
173 }
174
176 {
177 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
178 get
179 {
181 {
182 s_getUninitializedObjectMethod = typeof(XmlFormatReaderGenerator).GetMethod("UnsafeGetUninitializedObject", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, new Type[1] { typeof(Type) });
183 }
185 }
186 }
187
189 {
190 get
191 {
192 if (s_isStartElementMethod0 == null)
193 {
194 s_isStartElementMethod0 = typeof(XmlReaderDelegator).GetMethod("IsStartElement", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, Type.EmptyTypes);
195 }
197 }
198 }
199
201 {
202 get
203 {
204 if (s_isStartElementMethod2 == null)
205 {
206 s_isStartElementMethod2 = typeof(XmlReaderDelegator).GetMethod("IsStartElement", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, new Type[2]
207 {
208 typeof(XmlDictionaryString),
209 typeof(XmlDictionaryString)
210 });
211 }
213 }
214 }
215
217 {
218 get
219 {
220 if (s_localNameProperty == null)
221 {
222 s_localNameProperty = typeof(XmlReaderDelegator).GetProperty("LocalName", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
223 }
224 return s_localNameProperty;
225 }
226 }
227
229 {
230 get
231 {
232 if (s_namespaceProperty == null)
233 {
234 s_namespaceProperty = typeof(XmlReaderDelegator).GetProperty("NamespaceProperty", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
235 }
236 return s_namespaceProperty;
237 }
238 }
239
241 {
242 get
243 {
244 if (s_ienumeratorMoveNextMethod == null)
245 {
246 s_ienumeratorMoveNextMethod = typeof(IEnumerator).GetMethod("MoveNext");
247 }
249 }
250 }
251
253 {
254 get
255 {
256 if (s_moveToContentMethod == null)
257 {
258 s_moveToContentMethod = typeof(XmlReaderDelegator).GetMethod("MoveToContent", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
259 }
261 }
262 }
263
265 {
266 get
267 {
268 if (s_nodeTypeProperty == null)
269 {
270 s_nodeTypeProperty = typeof(XmlReaderDelegator).GetProperty("NodeType", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
271 }
272 return s_nodeTypeProperty;
273 }
274 }
275
277 {
278 get
279 {
280 if (s_onDeserializationMethod == null)
281 {
282 s_onDeserializationMethod = typeof(IDeserializationCallback).GetMethod("OnDeserialization");
283 }
285 }
286 }
287
289 {
290 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
291 get
292 {
293 if (s_readJsonValueMethod == null)
294 {
295 s_readJsonValueMethod = typeof(DataContractJsonSerializer).GetMethod("ReadJsonValue", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
296 }
298 }
299 }
300
302 {
303 get
304 {
306 {
307 s_serializationExceptionCtor = typeof(SerializationException).GetConstructor(new Type[1] { typeof(string) });
308 }
310 }
311 }
312
313 public static Type[] SerInfoCtorArgs
314 {
315 get
316 {
317 if (s_serInfoCtorArgs == null)
318 {
319 s_serInfoCtorArgs = new Type[2]
320 {
323 };
324 }
325 return s_serInfoCtorArgs;
326 }
327 }
328
330 {
331 get
332 {
334 {
335 s_throwDuplicateMemberExceptionMethod = typeof(XmlObjectSerializerReadContextComplexJson).GetMethod("ThrowDuplicateMemberException", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
336 }
338 }
339 }
340
342 {
343 get
344 {
346 {
347 s_throwMissingRequiredMembersMethod = typeof(XmlObjectSerializerReadContextComplexJson).GetMethod("ThrowMissingRequiredMembers", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
348 }
350 }
351 }
352
354 {
355 get
356 {
357 if (s_typeHandleProperty == null)
358 {
359 s_typeHandleProperty = typeof(Type).GetProperty("TypeHandle");
360 }
362 }
363 }
364
366 {
367 get
368 {
369 if (s_unboxPointer == null)
370 {
371 s_unboxPointer = typeof(Pointer).GetMethod("Unbox");
372 }
373 return s_unboxPointer;
374 }
375 }
376
378 {
379 get
380 {
382 {
383 s_useSimpleDictionaryFormatReadProperty = typeof(XmlObjectSerializerReadContextComplexJson).GetProperty("UseSimpleDictionaryFormat", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
384 }
386 }
387 }
388
390 {
391 get
392 {
394 {
395 s_useSimpleDictionaryFormatWriteProperty = typeof(XmlObjectSerializerWriteContextComplexJson).GetProperty("UseSimpleDictionaryFormat", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
396 }
398 }
399 }
400
402 {
403 get
404 {
406 {
407 s_writeAttributeStringMethod = typeof(XmlWriterDelegator).GetMethod("WriteAttributeString", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, new Type[4]
408 {
409 typeof(string),
410 typeof(string),
411 typeof(string),
412 typeof(string)
413 });
414 }
416 }
417 }
418
420 {
421 get
422 {
423 if (s_writeEndElementMethod == null)
424 {
425 s_writeEndElementMethod = typeof(XmlWriterDelegator).GetMethod("WriteEndElement", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, Type.EmptyTypes);
426 }
428 }
429 }
430
432 {
433 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
434 get
435 {
437 {
438 s_writeJsonISerializableMethod = typeof(XmlObjectSerializerWriteContextComplexJson).GetMethod("WriteJsonISerializable", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
439 }
441 }
442 }
443
445 {
446 get
447 {
449 {
450 s_writeJsonNameWithMappingMethod = typeof(XmlObjectSerializerWriteContextComplexJson).GetMethod("WriteJsonNameWithMapping", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
451 }
453 }
454 }
455
457 {
458 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
459 get
460 {
461 if (s_writeJsonValueMethod == null)
462 {
463 s_writeJsonValueMethod = typeof(DataContractJsonSerializer).GetMethod("WriteJsonValue", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
464 }
466 }
467 }
468
470 {
471 get
472 {
473 if (s_writeStartElementMethod == null)
474 {
475 s_writeStartElementMethod = typeof(XmlWriterDelegator).GetMethod("WriteStartElement", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, new Type[2]
476 {
477 typeof(XmlDictionaryString),
478 typeof(XmlDictionaryString)
479 });
480 }
482 }
483 }
484
486 {
487 get
488 {
490 {
491 s_writeStartElementStringMethod = typeof(XmlWriterDelegator).GetMethod("WriteStartElement", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, new Type[2]
492 {
493 typeof(string),
494 typeof(string)
495 });
496 }
498 }
499 }
500
502 {
503 get
504 {
505 if (s_parseEnumMethod == null)
506 {
507 s_parseEnumMethod = typeof(Enum).GetMethod("Parse", BindingFlags.Static | BindingFlags.Public, new Type[2]
508 {
509 typeof(Type),
510 typeof(string)
511 });
512 }
513 return s_parseEnumMethod;
514 }
515 }
516
518 {
519 get
520 {
521 if (s_getJsonMemberNameMethod == null)
522 {
523 s_getJsonMemberNameMethod = typeof(XmlObjectSerializerReadContextComplexJson).GetMethod("GetJsonMemberName", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, new Type[1] { typeof(XmlReaderDelegator) });
524 }
526 }
527 }
528}
static readonly Type[] EmptyTypes
Definition Type.cs:19