DomainClassXmlSerializer.WriteRootElement Method

Definition

Public WriteRootElement() method that serializes a root-level element to XML. The difference between root-level element and the rest elements in the XML is that the root may carry additional information like schema, version, etc. The default implementation just calls Write() method with no RootElementSettings, it's up to the derived implementations to do any additional checks.

public:
 virtual void WriteRootElement(Microsoft::VisualStudio::Modeling::SerializationContext ^ serializationContext, Microsoft::VisualStudio::Modeling::ModelElement ^ element, System::Xml::XmlWriter ^ writer);
public virtual void WriteRootElement (Microsoft.VisualStudio.Modeling.SerializationContext serializationContext, Microsoft.VisualStudio.Modeling.ModelElement element, System.Xml.XmlWriter writer);
abstract member WriteRootElement : Microsoft.VisualStudio.Modeling.SerializationContext * Microsoft.VisualStudio.Modeling.ModelElement * System.Xml.XmlWriter -> unit
override this.WriteRootElement : Microsoft.VisualStudio.Modeling.SerializationContext * Microsoft.VisualStudio.Modeling.ModelElement * System.Xml.XmlWriter -> unit
Public Overridable Sub WriteRootElement (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