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

◆ WriteExtensionDataValue()

void System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteExtensionDataValue ( XmlWriterDelegator xmlWriter,
IDataNode dataNode )
inlinepackageinherited

Definition at line 680 of file XmlObjectSerializerWriteContext.cs.

681 {
683 if (dataNode == null)
684 {
686 }
687 else
688 {
689 if (dataNode.PreservesReferences && OnHandleReference(xmlWriter, (dataNode.Value == null) ? dataNode : dataNode.Value, canContainCyclicReference: true))
690 {
691 return;
692 }
693 Type dataType = dataNode.DataType;
694 if (dataType == Globals.TypeOfClassDataNode)
695 {
696 WriteExtensionClassData(xmlWriter, (ClassDataNode)dataNode);
697 }
698 else if (dataType == Globals.TypeOfCollectionDataNode)
699 {
700 WriteExtensionCollectionData(xmlWriter, (CollectionDataNode)dataNode);
701 }
702 else if (dataType == Globals.TypeOfXmlDataNode)
703 {
704 WriteExtensionXmlData(xmlWriter, (XmlDataNode)dataNode);
705 }
706 else if (dataType == Globals.TypeOfISerializableDataNode)
707 {
708 WriteExtensionISerializableData(xmlWriter, (ISerializableDataNode)dataNode);
709 }
710 else
711 {
713 if (dataType == Globals.TypeOfObject)
714 {
715 object value = dataNode.Value;
716 if (value != null)
717 {
719 }
720 }
721 else
722 {
723 xmlWriter.WriteExtensionData(dataNode);
724 }
725 }
726 if (dataNode.PreservesReferences)
727 {
728 OnEndHandleReference(xmlWriter, (dataNode.Value == null) ? dataNode : dataNode.Value, canContainCyclicReference: true);
729 }
730 }
731 }
void WriteExtensionCollectionData(XmlWriterDelegator xmlWriter, CollectionDataNode dataNode)
void WriteNull(XmlWriterDelegator xmlWriter, Type memberType, bool isMemberTypeSerializable)
virtual void WriteExtensionDataTypeInfo(XmlWriterDelegator xmlWriter, IDataNode dataNode)
virtual bool OnHandleReference(XmlWriterDelegator xmlWriter, object obj, bool canContainCyclicReference)
virtual void OnEndHandleReference(XmlWriterDelegator xmlWriter, object obj, bool canContainCyclicReference)
void WriteExtensionISerializableData(XmlWriterDelegator xmlWriter, ISerializableDataNode dataNode)
void WriteExtensionXmlData(XmlWriterDelegator xmlWriter, XmlDataNode dataNode)
void WriteExtensionClassData(XmlWriterDelegator xmlWriter, ClassDataNode dataNode)
virtual void InternalSerialize(XmlWriterDelegator xmlWriter, object obj, bool isDeclaredType, bool writeXsiType, int declaredTypeID, RuntimeTypeHandle declaredTypeHandle)

References System.Runtime.Serialization.IDataNode.DataType, System.Runtime.Serialization.Dictionary, System.Runtime.Serialization.XmlObjectSerializerContext.IncrementItemCount(), System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(), System.Runtime.Serialization.XmlObjectSerializerWriteContext.OnEndHandleReference(), System.Runtime.Serialization.XmlObjectSerializerWriteContext.OnHandleReference(), System.Runtime.Serialization.IDataNode.PreservesReferences, System.Runtime.Serialization.Globals.TypeOfClassDataNode, System.Runtime.Serialization.Globals.TypeOfCollectionDataNode, System.Runtime.Serialization.Globals.TypeOfISerializableDataNode, System.Runtime.Serialization.Globals.TypeOfObject, System.Runtime.Serialization.Globals.TypeOfXmlDataNode, System.value, System.Runtime.Serialization.IDataNode.Value, System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteExtensionClassData(), System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteExtensionCollectionData(), System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteExtensionDataTypeInfo(), System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteExtensionISerializableData(), System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteExtensionXmlData(), and System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteNull().

Referenced by System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteExtensionCollectionData(), System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteExtensionDataMember(), and System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteExtensionISerializableData().