Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SurrogateDataContract.cs
Go to the documentation of this file.
3
5
6internal sealed class SurrogateDataContract : DataContract
7{
9 {
11
13
14 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
22 }
23
25
27
28 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
34
35 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
42
43 [MethodImpl(MethodImplOptions.NoInlining)]
48
49 [MethodImpl(MethodImplOptions.NoInlining)]
50 internal static object GetRealObject(IObjectReference obj, StreamingContext context)
51 {
52 return obj.GetRealObject(context);
53 }
54
55 [MethodImpl(MethodImplOptions.NoInlining)]
60
61 [MethodImpl(MethodImplOptions.NoInlining)]
66
67 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
69 {
70 xmlReader.Read();
71 Type underlyingType = base.UnderlyingType;
73 context.AddNewObject(obj);
74 string objectId = context.GetObjectId();
77 if (obj2 == null)
78 {
79 obj2 = obj;
80 }
82 {
83 ((IDeserializationCallback)obj2).OnDeserialization(null);
84 }
86 {
88 }
90 xmlReader.ReadEndElement();
91 return obj2;
92 }
93}
static unsafe Array CreateInstance(Type elementType, int length)
Definition Array.cs:473
static object GetUninitializedObject([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors|DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type type)
static XmlQualifiedName GetDefaultStableName(Type type)
static string GetClrTypeFullName(Type type)
static XmlQualifiedName CreateQualifiedName(string localName, string ns)
SurrogateDataContractCriticalHelper([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors|DynamicallyAccessedMemberTypes.NonPublicConstructors|DynamicallyAccessedMemberTypes.PublicMethods|DynamicallyAccessedMemberTypes.NonPublicMethods|DynamicallyAccessedMemberTypes.PublicFields|DynamicallyAccessedMemberTypes.PublicProperties)] Type type, ISerializationSurrogate serializationSurrogate)
readonly SurrogateDataContractCriticalHelper _helper
void SerializationSurrogateGetObjectData(object obj, SerializationInfo serInfo, StreamingContext context)
override object ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context)
object SerializationSurrogateSetObjectData(object obj, SerializationInfo serInfo, StreamingContext context)
SurrogateDataContract(Type type, ISerializationSurrogate serializationSurrogate)
static object GetRealObject(IObjectReference obj, StreamingContext context)
override void WriteXmlValue(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContext context)
void ReplaceDeserializedObject(string id, object oldObj, object newObj)
SerializationInfo ReadSerializationInfo(XmlReaderDelegator xmlReader, Type type)
void WriteSerializationInfo(XmlWriterDelegator xmlWriter, Type objType, SerializationInfo serInfo)
object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector? selector)
void GetObjectData(object obj, SerializationInfo info, StreamingContext context)