Share via


ImageShapeSerializer.TryCreateMonikerInstance Method

Definition

This method creates a Moniker of the correct derived (including ImageShape itself) instance of ImageShape based on the tag currently pointed by the reader.

public:
 override Microsoft::VisualStudio::Modeling::Moniker ^ TryCreateMonikerInstance(Microsoft::VisualStudio::Modeling::SerializationContext ^ serializationContext, System::Xml::XmlReader ^ reader, Microsoft::VisualStudio::Modeling::ModelElement ^ sourceRolePlayer, Guid relDomainClassId, Microsoft::VisualStudio::Modeling::Partition ^ partition);
public override Microsoft.VisualStudio.Modeling.Moniker TryCreateMonikerInstance (Microsoft.VisualStudio.Modeling.SerializationContext serializationContext, System.Xml.XmlReader reader, Microsoft.VisualStudio.Modeling.ModelElement sourceRolePlayer, Guid relDomainClassId, Microsoft.VisualStudio.Modeling.Partition partition);
override this.TryCreateMonikerInstance : Microsoft.VisualStudio.Modeling.SerializationContext * System.Xml.XmlReader * Microsoft.VisualStudio.Modeling.ModelElement * Guid * Microsoft.VisualStudio.Modeling.Partition -> Microsoft.VisualStudio.Modeling.Moniker
Public Overrides Function TryCreateMonikerInstance (serializationContext As SerializationContext, reader As XmlReader, sourceRolePlayer As ModelElement, relDomainClassId As Guid, partition As Partition) As Moniker

Parameters

serializationContext
SerializationContext

Serialization context.

reader
XmlReader

XmlReader to read serialized data from.

sourceRolePlayer
ModelElement

The source role-player instance from which the moniker being created is referenced.

relDomainClassId
Guid

The DomainClass Id of the relationship that connects the sourceRolePlayer to the moniker being created.

partition
Partition

The new Moniker should be created in the Store associated with this partition.

Returns

Created ModelRoot instance, or null if the reader is not pointing to a correct monikerized instance.

Remarks

The caller will guarantee that the reader is positioned at open XML tag of the next element being read. This method should not move the reader; the reader should remain at the same position when this method returns.

Applies to