Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetSurrogatedType()

override Type System.Runtime.Serialization.XmlObjectSerializerWriteContextComplex.GetSurrogatedType ( Type type)
inlinepackagevirtualinherited

Reimplemented from System.Runtime.Serialization.XmlObjectSerializerContext.

Definition at line 211 of file XmlObjectSerializerWriteContextComplex.cs.

212 {
214 {
215 return base.GetSurrogatedType(type);
216 }
217 type = DataContract.UnwrapNullableType(type);
218 Type surrogatedType = DataContractSerializer.GetSurrogatedType(_serializationSurrogateProvider, type);
220 {
221 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataContractException(System.SR.Format(System.SR.SurrogatesWithGetOnlyCollectionsNotSupportedSerDeser, DataContract.GetClrTypeFullName(type))));
222 }
223 return surrogatedType;
224 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string SurrogatesWithGetOnlyCollectionsNotSupportedSerDeser
Definition SR.cs:632
Definition SR.cs:7

References System.Runtime.Serialization.XmlObjectSerializerWriteContextComplex._serializationSurrogateProvider, System.Runtime.Serialization.Dictionary, System.SR.Format(), System.Runtime.Serialization.DataContract.GetClrTypeFullName(), System.Runtime.Serialization.DataContractSerializer.GetSurrogatedType(), System.Runtime.Serialization.XmlObjectSerializerWriteContext.IsGetOnlyCollection, System.SR.SurrogatesWithGetOnlyCollectionsNotSupportedSerDeser, System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(), System.type, and System.Runtime.Serialization.DataContract.UnwrapNullableType().

Referenced by System.Runtime.Serialization.XmlObjectSerializerWriteContextComplex.InternalSerializeWithSurrogate().