CompartmentShapeMapSerializer.TryCreateMonikerInstance(SerializationContext, XmlReader, ModelElement, Guid, Partition) 方法

定義

這個方法會根據讀取器目前指向的標記,建立正確衍生 (的標記,包括 CompartmentShapeMap 本身) CompartmentShapeMap 實例。This method creates a Moniker of the correct derived (including CompartmentShapeMap itself) instance of CompartmentShapeMap 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

參數

serializationContext
SerializationContext

序列化內容。Serialization context.

reader
XmlReader

要從中讀取序列化資料的 XmlReader。XmlReader to read serialized data from.

sourceRolePlayer
ModelElement

參考所建立之標記的來源角色扮演者實例。The source role-player instance from which the moniker being created is referenced.

relDomainClassId
Guid

關聯性的 DomainClass 識別碼,此關聯性會將 sourceRolePlayer 連接到所建立的標記。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.

傳回

Moniker

建立 ModelRoot 實例,如果讀取器未指向正確的 monikerized 實例,則為 null。Created ModelRoot instance, or null if the reader is not pointing to a correct monikerized instance.

備註

呼叫端會保證讀取器位於要讀取的下一個元素的 open XML 標記。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.

適用於