Compartir a través de


DomainClassXmlSerializer.Write Method

Definition

Overloads

Write(SerializationContext, ModelElement, XmlWriter)

Public Write() method that serializes the ModelElement instance associated with this serializer instance into XML. This method just calls Write() with no RootElementSettings.

Write(SerializationContext, ModelElement, XmlWriter, RootElementSettings)

Public Write() method that serializes the ModelElement instance associated with this serializer instance into XML.

Write(SerializationContext, ModelElement, XmlWriter)

Public Write() method that serializes the ModelElement instance associated with this serializer instance into XML. This method just calls Write() with no RootElementSettings.

public:
 void Write(Microsoft::VisualStudio::Modeling::SerializationContext ^ serializationContext, Microsoft::VisualStudio::Modeling::ModelElement ^ element, System::Xml::XmlWriter ^ writer);
public void Write (Microsoft.VisualStudio.Modeling.SerializationContext serializationContext, Microsoft.VisualStudio.Modeling.ModelElement element, System.Xml.XmlWriter writer);
member this.Write : Microsoft.VisualStudio.Modeling.SerializationContext * Microsoft.VisualStudio.Modeling.ModelElement * System.Xml.XmlWriter -> unit
Public Sub Write (serializationContext As SerializationContext, element As ModelElement, writer As XmlWriter)

Parameters

serializationContext
SerializationContext

Serialization context.

element
ModelElement

ModelElement instance that will be serialized.

writer
XmlWriter

XmlWriter to write serialized data to.

Applies to

Write(SerializationContext, ModelElement, XmlWriter, RootElementSettings)

Public Write() method that serializes the ModelElement instance associated with this serializer instance into XML.

public:
 virtual void Write(Microsoft::VisualStudio::Modeling::SerializationContext ^ serializationContext, Microsoft::VisualStudio::Modeling::ModelElement ^ element, System::Xml::XmlWriter ^ writer, Microsoft::VisualStudio::Modeling::RootElementSettings ^ rootElementSettings);
public virtual void Write (Microsoft.VisualStudio.Modeling.SerializationContext serializationContext, Microsoft.VisualStudio.Modeling.ModelElement element, System.Xml.XmlWriter writer, Microsoft.VisualStudio.Modeling.RootElementSettings rootElementSettings);
abstract member Write : Microsoft.VisualStudio.Modeling.SerializationContext * Microsoft.VisualStudio.Modeling.ModelElement * System.Xml.XmlWriter * Microsoft.VisualStudio.Modeling.RootElementSettings -> unit
override this.Write : Microsoft.VisualStudio.Modeling.SerializationContext * Microsoft.VisualStudio.Modeling.ModelElement * System.Xml.XmlWriter * Microsoft.VisualStudio.Modeling.RootElementSettings -> unit
Public Overridable Sub Write (serializationContext As SerializationContext, element As ModelElement, writer As XmlWriter, rootElementSettings As RootElementSettings)

Parameters

serializationContext
SerializationContext

Serialization context.

element
ModelElement

ModelElement instance that will be serialized.

writer
XmlWriter

XmlWriter to write serialized data to.

rootElementSettings
RootElementSettings

The root element settings if the passed in element is serialized as a root element in the XML. The root element contains additional information like schema target namespace, version, etc. This should only be passed for root-level elements. Null should be passed for rest elements (and ideally call the Write() method without this parameter).

Applies to