다음을 통해 공유


DomainClassXmlSerializer.ReadRootElement Method

Definition

Public ReadRootElement() method that deserializes a root-level element from 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 Read() method, it's up to the derived implementations to do any additional checks.

public:
 virtual void ReadRootElement(Microsoft::VisualStudio::Modeling::SerializationContext ^ serializationContext, Microsoft::VisualStudio::Modeling::ModelElement ^ element, System::Xml::XmlReader ^ reader, Microsoft::VisualStudio::Modeling::ISchemaResolver ^ schemaResolver);
public virtual void ReadRootElement (Microsoft.VisualStudio.Modeling.SerializationContext serializationContext, Microsoft.VisualStudio.Modeling.ModelElement element, System.Xml.XmlReader reader, Microsoft.VisualStudio.Modeling.ISchemaResolver schemaResolver);
abstract member ReadRootElement : Microsoft.VisualStudio.Modeling.SerializationContext * Microsoft.VisualStudio.Modeling.ModelElement * System.Xml.XmlReader * Microsoft.VisualStudio.Modeling.ISchemaResolver -> unit
override this.ReadRootElement : Microsoft.VisualStudio.Modeling.SerializationContext * Microsoft.VisualStudio.Modeling.ModelElement * System.Xml.XmlReader * Microsoft.VisualStudio.Modeling.ISchemaResolver -> unit
Public Overridable Sub ReadRootElement (serializationContext As SerializationContext, element As ModelElement, reader As XmlReader, schemaResolver As ISchemaResolver)

Parameters

serializationContext
SerializationContext

Serialization context.

element
ModelElement

In-memory ModelElement instance that will get the deserialized data.

reader
XmlReader

XmlReader to read serialized data from.

schemaResolver
ISchemaResolver

An ISchemaResolver that allows the serializer to do schema validation on the root element (and everything inside it).

Applies to