Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ObjectReader.cs
Go to the documentation of this file.
3using System.IO;
5
7
8internal sealed class ObjectReader
9{
10 internal sealed class TypeNAssembly
11 {
12 public Type Type;
13
14 public string AssemblyName;
15 }
16
17 internal sealed class TopLevelAssemblyTypeResolver
18 {
19 private readonly Assembly _topLevelAssembly;
20
25
26 [RequiresUnreferencedCode("Types might be removed")]
28 {
29 if (assembly == null)
30 {
32 }
34 }
35 }
36
37 internal Stream _stream;
38
40
42
44
46
48
49 internal long _topId;
50
51 internal bool _isSimpleAssembly;
52
53 internal object _topObject;
54
56
58
59 internal SerStack _stack;
60
62
63 internal object[] _crossAppDomainArray;
64
66
67 private bool _oldFormatDetected;
68
70
71 private readonly NameCache _typeCache = new NameCache();
72
74
75 private string _previousName;
76
78
79 private SerStack ValueFixupStack => _valueFixupStack ?? (_valueFixupStack = new SerStack("ValueType Fixup Stack"));
80
81 internal object TopObject
82 {
83 get
84 {
85 return _topObject;
86 }
87 set
88 {
90 if (_objectManager != null)
91 {
93 }
94 }
95 }
96
98 {
99 if (stream == null)
100 {
101 throw new ArgumentNullException("stream");
102 }
103 _stream = stream;
104 _surrogates = selector;
105 _context = context;
106 _binder = binder;
108 }
109
110 [RequiresUnreferencedCode("Types might be removed")]
112 {
113 if (serParser == null)
114 {
115 throw new ArgumentNullException("serParser");
116 }
117 _fullDeserialization = false;
118 TopObject = null;
119 _topId = 0L;
122 {
124 {
127 }
128 serParser.Run();
130 {
132 }
133 if (TopObject == null)
134 {
136 }
137 if (HasSurrogate(TopObject.GetType()) && _topId != 0L)
138 {
140 }
142 {
143 TopObject = ((IObjectReference)TopObject).GetRealObject(_context);
144 }
146 {
148 }
149 return TopObject;
150 }
151 }
152
153 private bool HasSurrogate(Type t)
154 {
155 ISurrogateSelector selector;
156 if (_surrogates != null)
157 {
158 return _surrogates.GetSurrogate(t, _context, out selector) != null;
159 }
160 return false;
161 }
162
170
172 {
174 _stack = new SerStack("ObjectReader Object Stack");
176 if (_formatterConverter == null)
177 {
179 }
180 }
181
182 internal object CrossAppDomainArray(int index)
183 {
185 }
186
191
196
197 [RequiresUnreferencedCode("ObjectReader requires unreferenced code")]
198 internal void Parse(ParseRecord pr)
199 {
200 switch (pr._parseTypeEnum)
201 {
202 case InternalParseTypeE.SerializedStreamHeader:
204 break;
205 case InternalParseTypeE.SerializedStreamHeaderEnd:
207 break;
208 case InternalParseTypeE.Object:
210 break;
211 case InternalParseTypeE.ObjectEnd:
213 break;
214 case InternalParseTypeE.Member:
216 break;
217 case InternalParseTypeE.MemberEnd:
219 break;
220 default:
222 case InternalParseTypeE.Envelope:
223 case InternalParseTypeE.EnvelopeEnd:
224 case InternalParseTypeE.Body:
225 case InternalParseTypeE.BodyEnd:
226 break;
227 }
228 }
229
231 {
232 throw new SerializationException(System.SR.Format(System.SR.Serialization_ParseError, onStack._name + " " + onStack._parseTypeEnum.ToString() + " " + processing._name + " " + processing._parseTypeEnum));
233 }
234
236 {
237 _stack.Push(pr);
238 }
239
241 {
242 _stack.Pop();
243 }
244
245 [RequiresUnreferencedCode("ObjectReader requires unreferenced code")]
247 {
249 {
251 }
252 if (pr._objectPositionEnum == InternalObjectPositionE.Top)
253 {
254 _topId = pr._objectId;
255 }
256 if (pr._parseTypeEnum == InternalParseTypeE.Object)
257 {
258 _stack.Push(pr);
259 }
260 if (pr._objectTypeEnum == InternalObjectTypeE.Array)
261 {
262 ParseArray(pr);
263 return;
264 }
265 if (pr._dtType == null)
266 {
268 return;
269 }
270 if ((object)pr._dtType == Converter.s_typeofString)
271 {
272 if (pr._value != null)
273 {
274 pr._newObj = pr._value;
275 if (pr._objectPositionEnum == InternalObjectPositionE.Top)
276 {
277 TopObject = pr._newObj;
278 return;
279 }
280 _stack.Pop();
282 }
283 return;
284 }
285 CheckSerializable(pr._dtType);
288 if (pr._newObj == null)
289 {
291 }
292 if (pr._objectPositionEnum == InternalObjectPositionE.Top)
293 {
294 TopObject = pr._newObj;
295 }
296 if (pr._objectInfo == null)
297 {
299 }
300 }
301
302 [RequiresUnreferencedCode("ObjectReader requires unreferenced code")]
304 {
306 if (parseRecord._objectPositionEnum == InternalObjectPositionE.Top && (object)parseRecord._dtType == Converter.s_typeofString)
307 {
309 TopObject = parseRecord._newObj;
310 return;
311 }
312 _stack.Pop();
314 if (parseRecord._newObj == null)
315 {
316 return;
317 }
318 if (parseRecord._objectTypeEnum == InternalObjectTypeE.Array)
319 {
320 if (parseRecord._objectPositionEnum == InternalObjectPositionE.Top)
321 {
322 TopObject = parseRecord._newObj;
323 }
325 return;
326 }
327 parseRecord._objectInfo.PopulateObjectMembers(parseRecord._newObj, parseRecord._memberData);
328 if (!parseRecord._isRegistered && parseRecord._objectId > 0)
329 {
331 }
332 if (parseRecord._isValueTypeFixup)
333 {
336 }
337 if (parseRecord._objectPositionEnum == InternalObjectPositionE.Top)
338 {
339 TopObject = parseRecord._newObj;
340 }
341 parseRecord._objectInfo.ObjectEnd();
342 }
343
344 [RequiresUnreferencedCode("ObjectReader requires unreferenced code")]
346 {
347 if (pr._arrayTypeEnum == InternalArrayTypeE.Base64)
348 {
349 pr._newObj = ((pr._value.Length > 0) ? Convert.FromBase64String(pr._value) : Array.Empty<byte>());
350 if (_stack.Peek() == pr)
351 {
352 _stack.Pop();
353 }
354 if (pr._objectPositionEnum == InternalObjectPositionE.Top)
355 {
356 TopObject = pr._newObj;
357 }
359 RegisterObject(pr._newObj, pr, objectPr);
360 return;
361 }
362 if (pr._newObj != null && Converter.IsWriteAsByteArray(pr._arrayElementTypeCode))
363 {
364 if (pr._objectPositionEnum == InternalObjectPositionE.Top)
365 {
366 TopObject = pr._newObj;
367 }
369 RegisterObject(pr._newObj, pr, objectPr2);
370 return;
371 }
372 if (pr._arrayTypeEnum == InternalArrayTypeE.Jagged || pr._arrayTypeEnum == InternalArrayTypeE.Single)
373 {
374 bool flag = true;
375 if (pr._lowerBoundA == null || pr._lowerBoundA[0] == 0)
376 {
377 if ((object)pr._arrayElementType == Converter.s_typeofString)
378 {
379 object[] objectA = new string[pr._lengthA[0]];
381 pr._newObj = pr._objectA;
382 flag = false;
383 }
384 else if ((object)pr._arrayElementType == Converter.s_typeofObject)
385 {
386 pr._objectA = new object[pr._lengthA[0]];
387 pr._newObj = pr._objectA;
388 flag = false;
389 }
390 else if (pr._arrayElementType != null)
391 {
392 pr._newObj = Array.CreateInstance(pr._arrayElementType, pr._lengthA[0]);
393 }
394 pr._isLowerBound = false;
395 }
396 else
397 {
398 if (pr._arrayElementType != null)
399 {
400 pr._newObj = Array.CreateInstance(pr._arrayElementType, pr._lengthA, pr._lowerBoundA);
401 }
402 pr._isLowerBound = true;
403 }
404 if (pr._arrayTypeEnum == InternalArrayTypeE.Single)
405 {
406 if (!pr._isLowerBound && Converter.IsWriteAsByteArray(pr._arrayElementTypeCode))
407 {
408 pr._primitiveArray = new PrimitiveArray(pr._arrayElementTypeCode, (Array)pr._newObj);
409 }
410 else if (flag && pr._arrayElementType != null && !pr._arrayElementType.IsValueType && !pr._isLowerBound)
411 {
412 pr._objectA = (object[])pr._newObj;
413 }
414 }
415 pr._indexMap = new int[1];
416 return;
417 }
418 if (pr._arrayTypeEnum == InternalArrayTypeE.Rectangular)
419 {
420 pr._isLowerBound = false;
421 if (pr._lowerBoundA != null)
422 {
423 for (int i = 0; i < pr._rank; i++)
424 {
425 if (pr._lowerBoundA[i] != 0)
426 {
427 pr._isLowerBound = true;
428 }
429 }
430 }
431 if (pr._arrayElementType != null)
432 {
433 pr._newObj = ((!pr._isLowerBound) ? Array.CreateInstance(pr._arrayElementType, pr._lengthA) : Array.CreateInstance(pr._arrayElementType, pr._lengthA, pr._lowerBoundA));
434 }
435 int num = 1;
436 for (int j = 0; j < pr._rank; j++)
437 {
438 num *= pr._lengthA[j];
439 }
440 pr._indexMap = new int[pr._rank];
441 pr._rectangularMap = new int[pr._rank];
442 pr._linearlength = num;
443 return;
444 }
446 }
447
449 {
450 for (int num = pr._rank - 1; num > -1; num--)
451 {
452 if (pr._rectangularMap[num] < pr._lengthA[num] - 1)
453 {
454 pr._rectangularMap[num]++;
455 if (num < pr._rank - 1)
456 {
457 for (int i = num + 1; i < pr._rank; i++)
458 {
459 pr._rectangularMap[i] = 0;
460 }
461 }
462 Array.Copy(pr._rectangularMap, pr._indexMap, pr._rank);
463 break;
464 }
465 }
466 }
467
468 [RequiresUnreferencedCode("ObjectReader requires unreferenced code")]
470 {
472 if (parseRecord._arrayTypeEnum == InternalArrayTypeE.Rectangular)
473 {
474 if (parseRecord._memberIndex > 0)
475 {
477 }
478 if (parseRecord._isLowerBound)
479 {
480 for (int i = 0; i < parseRecord._rank; i++)
481 {
482 parseRecord._indexMap[i] = parseRecord._rectangularMap[i] + parseRecord._lowerBoundA[i];
483 }
484 }
485 }
486 else
487 {
488 parseRecord._indexMap[0] = ((!parseRecord._isLowerBound) ? parseRecord._memberIndex : (parseRecord._lowerBoundA[0] + parseRecord._memberIndex));
489 }
490 if (pr._memberValueEnum == InternalMemberValueE.Reference)
491 {
492 object @object = _objectManager.GetObject(pr._idRef);
493 if (@object == null)
494 {
495 int[] array = new int[parseRecord._rank];
496 Array.Copy(parseRecord._indexMap, array, parseRecord._rank);
498 }
499 else if (parseRecord._objectA != null)
500 {
501 parseRecord._objectA[parseRecord._indexMap[0]] = @object;
502 }
503 else
504 {
505 ((Array)parseRecord._newObj).SetValue(@object, parseRecord._indexMap);
506 }
507 }
508 else if (pr._memberValueEnum == InternalMemberValueE.Nested)
509 {
510 if (pr._dtType == null)
511 {
512 pr._dtType = parseRecord._arrayElementType;
513 }
515 _stack.Push(pr);
516 if (parseRecord._arrayElementType != null)
517 {
518 if (parseRecord._arrayElementType.IsValueType && pr._arrayElementTypeCode == InternalPrimitiveTypeE.Invalid)
519 {
522 }
523 else if (parseRecord._objectA != null)
524 {
525 parseRecord._objectA[parseRecord._indexMap[0]] = pr._newObj;
526 }
527 else
528 {
529 ((Array)parseRecord._newObj).SetValue(pr._newObj, parseRecord._indexMap);
530 }
531 }
532 }
533 else if (pr._memberValueEnum == InternalMemberValueE.InlineValue)
534 {
536 {
538 if (parseRecord._objectA != null)
539 {
540 parseRecord._objectA[parseRecord._indexMap[0]] = pr._value;
541 }
542 else
543 {
544 ((Array)parseRecord._newObj).SetValue(pr._value, parseRecord._indexMap);
545 }
546 }
547 else if (parseRecord._isArrayVariant)
548 {
549 if (pr._keyDt == null)
550 {
552 }
553 object obj = null;
554 if ((object)pr._dtType == Converter.s_typeofString)
555 {
557 obj = pr._value;
558 }
559 else
560 {
561 obj = ((pr._varValue != null) ? pr._varValue : Converter.FromString(pr._value, pr._dtTypeCode));
562 }
563 if (parseRecord._objectA != null)
564 {
565 parseRecord._objectA[parseRecord._indexMap[0]] = obj;
566 }
567 else
568 {
569 ((Array)parseRecord._newObj).SetValue(obj, parseRecord._indexMap);
570 }
571 }
572 else if (parseRecord._primitiveArray != null)
573 {
574 parseRecord._primitiveArray.SetValue(pr._value, parseRecord._indexMap[0]);
575 }
576 else
577 {
578 object obj2 = ((pr._varValue != null) ? pr._varValue : Converter.FromString(pr._value, parseRecord._arrayElementTypeCode));
579 if (parseRecord._objectA != null)
580 {
581 parseRecord._objectA[parseRecord._indexMap[0]] = obj2;
582 }
583 else
584 {
585 ((Array)parseRecord._newObj).SetValue(obj2, parseRecord._indexMap);
586 }
587 }
588 }
589 else if (pr._memberValueEnum == InternalMemberValueE.Null)
590 {
592 }
593 else
594 {
596 }
597 parseRecord._memberIndex++;
598 }
599
600 [RequiresUnreferencedCode("ObjectReader requires unreferenced code")]
602 {
603 if (pr._memberValueEnum == InternalMemberValueE.Nested)
604 {
606 }
607 }
608
609 [RequiresUnreferencedCode("ObjectReader requires unreferenced code")]
611 {
613 InternalMemberTypeE memberTypeEnum = pr._memberTypeEnum;
615 {
617 return;
618 }
619 if (pr._dtType == null && parseRecord._objectInfo._isTyped)
620 {
621 pr._dtType = parseRecord._objectInfo.GetType(pr._name);
622 if (pr._dtType != null)
623 {
625 }
626 }
627 if (pr._memberValueEnum == InternalMemberValueE.Null)
628 {
629 parseRecord._objectInfo.AddValue(pr._name, null, ref parseRecord._si, ref parseRecord._memberData);
630 }
631 else if (pr._memberValueEnum == InternalMemberValueE.Nested)
632 {
634 _stack.Push(pr);
635 if (pr._objectInfo != null && pr._objectInfo._objectType != null && pr._objectInfo._objectType.IsValueType)
636 {
638 ValueFixupStack.Push(new ValueFixup(parseRecord._newObj, pr._name, parseRecord._objectInfo));
639 }
640 else
641 {
642 parseRecord._objectInfo.AddValue(pr._name, pr._newObj, ref parseRecord._si, ref parseRecord._memberData);
643 }
644 }
645 else if (pr._memberValueEnum == InternalMemberValueE.Reference)
646 {
647 object @object = _objectManager.GetObject(pr._idRef);
648 if (@object == null)
649 {
650 parseRecord._objectInfo.AddValue(pr._name, null, ref parseRecord._si, ref parseRecord._memberData);
651 parseRecord._objectInfo.RecordFixup(parseRecord._objectId, pr._name, pr._idRef);
652 }
653 else
654 {
655 parseRecord._objectInfo.AddValue(pr._name, @object, ref parseRecord._si, ref parseRecord._memberData);
656 }
657 }
658 else if (pr._memberValueEnum == InternalMemberValueE.InlineValue)
659 {
660 if ((object)pr._dtType == Converter.s_typeofString)
661 {
663 parseRecord._objectInfo.AddValue(pr._name, pr._value, ref parseRecord._si, ref parseRecord._memberData);
664 }
665 else if (pr._dtTypeCode == InternalPrimitiveTypeE.Invalid)
666 {
667 if (pr._arrayTypeEnum == InternalArrayTypeE.Base64)
668 {
669 parseRecord._objectInfo.AddValue(pr._name, Convert.FromBase64String(pr._value), ref parseRecord._si, ref parseRecord._memberData);
670 return;
671 }
672 if ((object)pr._dtType == Converter.s_typeofObject)
673 {
675 }
677 if ((object)pr._dtType == Converter.s_typeofSystemVoid)
678 {
679 parseRecord._objectInfo.AddValue(pr._name, pr._dtType, ref parseRecord._si, ref parseRecord._memberData);
680 }
681 else if (parseRecord._objectInfo._isSi)
682 {
683 parseRecord._objectInfo.AddValue(pr._name, pr._value, ref parseRecord._si, ref parseRecord._memberData);
684 }
685 }
686 else
687 {
688 object value = ((pr._varValue != null) ? pr._varValue : Converter.FromString(pr._value, pr._dtTypeCode));
689 parseRecord._objectInfo.AddValue(pr._name, value, ref parseRecord._si, ref parseRecord._memberData);
690 }
691 }
692 else
693 {
695 }
696 }
697
698 [RequiresUnreferencedCode("ObjectReader requires unreferenced code")]
700 {
701 switch (pr._memberTypeEnum)
702 {
703 case InternalMemberTypeE.Item:
705 break;
706 case InternalMemberTypeE.Field:
707 if (pr._memberValueEnum == InternalMemberValueE.Nested)
708 {
710 }
711 break;
712 default:
714 break;
715 }
716 }
717
718 [RequiresUnreferencedCode("ObjectReader requires unreferenced code")]
720 {
721 if (!pr._isRegistered && pr._objectId > 0)
722 {
723 RegisterObject(pr._value, pr, parentPr, bIsString: true);
724 }
725 }
726
727 [RequiresUnreferencedCode("ObjectReader requires unreferenced code")]
729 {
731 }
732
733 [RequiresUnreferencedCode("ObjectReader requires unreferenced code")]
735 {
736 if (pr._isRegistered)
737 {
738 return;
739 }
740 pr._isRegistered = true;
742 long idOfContainingObj = 0L;
743 MemberInfo member = null;
744 int[] arrayIndex = null;
745 if (objectPr != null)
746 {
747 arrayIndex = objectPr._indexMap;
748 idOfContainingObj = objectPr._objectId;
749 if (objectPr._objectInfo != null && !objectPr._objectInfo._isSi)
750 {
751 member = objectPr._objectInfo.GetMemberInfo(pr._name);
752 }
753 }
754 serializationInfo = pr._si;
755 if (bIsString)
756 {
758 }
759 else
760 {
762 }
763 }
764
765 internal long GetId(long objectId)
766 {
768 {
770 }
771 if (objectId > 0)
772 {
773 return objectId;
774 }
775 if (_oldFormatDetected || objectId == -1)
776 {
777 _oldFormatDetected = true;
778 if (_valTypeObjectIdTable == null)
779 {
781 }
782 long num = 0L;
783 if ((num = _valTypeObjectIdTable[(int)objectId]) == 0L)
784 {
785 num = int.MaxValue + objectId;
786 _valTypeObjectIdTable[(int)objectId] = (int)num;
787 }
788 return num;
789 }
790 return -1 * objectId;
791 }
792
793 [RequiresUnreferencedCode("Types might be removed")]
794 internal Type Bind(string assemblyString, string typeString)
795 {
796 Type type = null;
797 if (_binder != null)
798 {
799 type = _binder.BindToType(assemblyString, typeString);
800 }
801 if (type == null)
802 {
803 type = FastBindToType(assemblyString, typeString);
804 }
805 return type;
806 }
807
808 [RequiresUnreferencedCode("Types might be removed")]
809 internal Type FastBindToType(string assemblyName, string typeName)
810 {
811 Type type = null;
813 if (typeNAssembly == null || typeNAssembly.AssemblyName != assemblyName)
814 {
815 if (assemblyName == null)
816 {
817 return null;
818 }
819 Assembly assembly = null;
821 try
822 {
824 }
825 catch
826 {
827 return null;
828 }
830 {
832 }
833 else
834 {
835 try
836 {
838 }
839 catch
840 {
841 }
842 }
843 if (assembly == null)
844 {
845 return null;
846 }
848 {
850 }
851 else
852 {
854 }
855 if (type == null)
856 {
857 return null;
858 }
864 }
865 return typeNAssembly.Type;
866 }
867
869 {
870 try
871 {
872 return Assembly.Load(assemblyName);
873 }
874 catch
875 {
876 }
877 if (assemblyName != null)
878 {
879 try
880 {
881 return Assembly.Load(assemblyName.Name);
882 }
883 catch
884 {
885 }
886 }
887 return null;
888 }
889
890 [RequiresUnreferencedCode("Types might be removed")]
891 private static void GetSimplyNamedTypeFromAssembly(Assembly assm, string typeName, ref Type type)
892 {
893 try
894 {
896 }
897 catch (TypeLoadException)
898 {
899 }
901 {
902 }
903 catch (FileLoadException)
904 {
905 }
907 {
908 }
909 if (type == null)
910 {
912 }
913 }
914
915 [RequiresUnreferencedCode("Types might be removed")]
917 {
918 Type type;
919 if (_previousName != null && _previousName.Length == name.Length && _previousName.Equals(name) && _previousAssemblyString != null && _previousAssemblyString.Length == assemblyInfo._assemblyString.Length && _previousAssemblyString.Equals(assemblyInfo._assemblyString))
920 {
922 }
923 else
924 {
925 type = Bind(assemblyInfo._assemblyString, name);
926 if (type == null)
927 {
930 {
932 }
933 else
934 {
936 }
937 if (type != null)
938 {
940 }
941 }
942 _previousAssemblyString = assemblyInfo._assemblyString;
943 _previousName = name;
945 }
946 return type;
947 }
948
952}
static unsafe Array CreateInstance(Type elementType, int length)
Definition Array.cs:473
static unsafe void Copy(Array sourceArray, Array destinationArray, int length)
Definition Array.cs:624
static unsafe byte[] FromBase64String(string s)
Definition Convert.cs:2904
static CultureInfo InvariantCulture
virtual ? string FullName
Definition Assembly.cs:74
static ? Assembly GetAssembly(Type type)
Definition Assembly.cs:472
static Assembly Load(string assemblyString)
Definition Assembly.cs:157
virtual ? Type GetType(string name)
Definition Assembly.cs:305
static ? Type GetTypeFromAssembly(Assembly assem, string name)
static object GetUninitializedObject([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors|DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type type)
static bool IsWriteAsByteArray(InternalPrimitiveTypeE code)
Definition Converter.cs:130
static object FromString(string value, InternalPrimitiveTypeE code)
Definition Converter.cs:375
static InternalPrimitiveTypeE ToCode(Type type)
Definition Converter.cs:105
Type ResolveType(Assembly assembly, string simpleTypeName, bool ignoreCase)
Type GetType(BinaryAssemblyInfo assemblyInfo, string name)
void RegisterObject(object obj, ParseRecord pr, ParseRecord objectPr)
void ParseString(ParseRecord pr, ParseRecord parentPr)
void ParseError(ParseRecord processing, ParseRecord onStack)
static void GetSimplyNamedTypeFromAssembly(Assembly assm, string typeName, ref Type type)
static void CheckTypeForwardedTo(Assembly sourceAssembly, Assembly destAssembly, Type resolvedType)
Type Bind(string assemblyString, string typeString)
ObjectReader(Stream stream, ISurrogateSelector selector, StreamingContext context, InternalFE formatterEnums, SerializationBinder binder)
ReadObjectInfo CreateReadObjectInfo([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType, string[] memberNames, Type[] memberTypes)
ReadObjectInfo CreateReadObjectInfo([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType)
static Assembly ResolveSimpleAssemblyName(AssemblyName assemblyName)
Type FastBindToType(string assemblyName, string typeName)
void RegisterObject(object obj, ParseRecord pr, ParseRecord objectPr, bool bIsString)
static ReadObjectInfo Create([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, ObjectManager objectManager, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, bool bSimpleAssembly)
virtual void RegisterObject(object obj, long objectID)
virtual void RecordArrayElementFixup(long arrayToBeFixed, int index, long objectRequired)
void RegisterString(string obj, long objectID, SerializationInfo info, long idOfContainingObj, MemberInfo member)
virtual ? object GetObject(long objectID)
Type? BindToType(string assemblyName, string typeName)
static DeserializationToken StartDeserialization()
static string Serialization_XMLElement
Definition SR.cs:108
static string Serialization_ArrayType
Definition SR.cs:94
static string Serialization_TypeMissing
Definition SR.cs:114
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Serialization_ParseError
Definition SR.cs:122
static string Serialization_TopObjectInstantiate
Definition SR.cs:110
static string Serialization_ArrayTypeObject
Definition SR.cs:112
static string Serialization_TopObject
Definition SR.cs:106
static string Serialization_NonSerType
Definition SR.cs:16
Definition SR.cs:7
static ? Type GetType(string typeName, bool throwOnError, bool ignoreCase)
Definition Type.cs:408
virtual bool IsSerializable
Definition Type.cs:311
Assembly Assembly
Definition Type.cs:49
string? FullName
Definition Type.cs:47
ISerializationSurrogate? GetSurrogate(Type type, StreamingContext context, out ISurrogateSelector selector)