DomainClassXmlSerializer.TryCreateMonikerInstance Method
Checks if the given XmlReader is pointing to a monikerized instance of a model element that this serializer can handle.
Namespace: Microsoft.VisualStudio.Modeling
Assembly: Microsoft.VisualStudio.Modeling.Sdk.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.10.0.dll)
Syntax
‘선언
Public Overridable Function TryCreateMonikerInstance ( _
serializationContext As SerializationContext, _
reader As XmlReader, _
sourceRolePlayer As ModelElement, _
relDomainClassId As Guid, _
partition As Partition _
) As Moniker
public virtual Moniker TryCreateMonikerInstance(
SerializationContext serializationContext,
XmlReader reader,
ModelElement sourceRolePlayer,
Guid relDomainClassId,
Partition partition
)
public:
virtual Moniker^ TryCreateMonikerInstance(
SerializationContext^ serializationContext,
XmlReader^ reader,
ModelElement^ sourceRolePlayer,
Guid relDomainClassId,
Partition^ partition
)
abstract TryCreateMonikerInstance :
serializationContext:SerializationContext *
reader:XmlReader *
sourceRolePlayer:ModelElement *
relDomainClassId:Guid *
partition:Partition -> Moniker
override TryCreateMonikerInstance :
serializationContext:SerializationContext *
reader:XmlReader *
sourceRolePlayer:ModelElement *
relDomainClassId:Guid *
partition:Partition -> Moniker
public function TryCreateMonikerInstance(
serializationContext : SerializationContext,
reader : XmlReader,
sourceRolePlayer : ModelElement,
relDomainClassId : Guid,
partition : Partition
) : Moniker
Parameters
- serializationContext
Type: Microsoft.VisualStudio.Modeling.SerializationContext
The serialization context that stores serialization errors, if any.
- reader
Type: System.Xml.XmlReader
The XmlReader from which to read.
- sourceRolePlayer
Type: Microsoft.VisualStudio.Modeling.ModelElement
The source role-player model element from which the moniker being created is referenced.
- relDomainClassId
Type: System.Guid
The domain class Id of the relationship that connects the source role player to the moniker being created.
- partition
Type: Microsoft.VisualStudio.Modeling.Partition
The new Moniker should be created in the store associated with this partition.
Return Value
Type: Microsoft.VisualStudio.Modeling.Moniker
If the XmlReader is currently pointing to a monikerized instance of a model element that this serializer can handle, this method creates a Moniker instance in the given Store. Otherwise, returns null.
Remarks
참고
The caller will guarantee that the reader is positioned at the open XML tag of the element moniker being read. This method will move the reader, unlike the TryCreateInstance method, because it might need to read the serialized moniker string.
If the reader is moved, it should be positioned at the closing tag of the element so that the caller can call SerializationUtilities.SkipToNextElement to move to the next element.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.