Partilhar via


DomainClassXmlSerializer.CreateInstance Method

Definition

With the given XmlReader, create an instance of the ModelElement in the given Partition. Note: This method is only called by TryCreateInstance() method once it determines the correct ModelElement instance to create.

protected:
 virtual Microsoft::VisualStudio::Modeling::ModelElement ^ CreateInstance(Microsoft::VisualStudio::Modeling::SerializationContext ^ serializationContext, System::Xml::XmlReader ^ reader, Microsoft::VisualStudio::Modeling::Partition ^ partition);
protected virtual Microsoft.VisualStudio.Modeling.ModelElement CreateInstance (Microsoft.VisualStudio.Modeling.SerializationContext serializationContext, System.Xml.XmlReader reader, Microsoft.VisualStudio.Modeling.Partition partition);
abstract member CreateInstance : Microsoft.VisualStudio.Modeling.SerializationContext * System.Xml.XmlReader * Microsoft.VisualStudio.Modeling.Partition -> Microsoft.VisualStudio.Modeling.ModelElement
override this.CreateInstance : Microsoft.VisualStudio.Modeling.SerializationContext * System.Xml.XmlReader * Microsoft.VisualStudio.Modeling.Partition -> Microsoft.VisualStudio.Modeling.ModelElement
Protected Overridable Function CreateInstance (serializationContext As SerializationContext, reader As XmlReader, partition As Partition) As ModelElement

Parameters

serializationContext
SerializationContext

Serialization context.

reader
XmlReader

XmlReader to read from.

partition
Partition

Partition in which the new element will be created.

Returns

The created ModelElement instance, or null if the reader is not pointing to a correct serialized instance.

Applies to