CompartmentShapeSerializer.TryCreateInstance Method
This method creates a correct instance of CompartmentShape based on the tag currently pointed by the reader. If the reader is positioned at a serialized CompartmentShape, a new CompartmentShape instance will be created in the given partition, otherwise null is returned.
Namespace: Microsoft.VisualStudio.Modeling.Diagrams
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll)
'Declaration
Public Overrides Function TryCreateInstance ( _
serializationContext As SerializationContext, _
reader As XmlReader, _
partition As Partition _
) As ModelElement
public override ModelElement TryCreateInstance(
SerializationContext serializationContext,
XmlReader reader,
Partition partition
)
public:
virtual ModelElement^ TryCreateInstance(
SerializationContext^ serializationContext,
XmlReader^ reader,
Partition^ partition
) override
abstract TryCreateInstance :
serializationContext:SerializationContext *
reader:XmlReader *
partition:Partition -> ModelElement
override TryCreateInstance :
serializationContext:SerializationContext *
reader:XmlReader *
partition:Partition -> ModelElement
public override function TryCreateInstance(
serializationContext : SerializationContext,
reader : XmlReader,
partition : Partition
) : ModelElement
serializationContext
Type: Microsoft.VisualStudio.Modeling.SerializationContextSerialization context.
reader
Type: System.Xml.XmlReaderXmlReader to read serialized data from.
partition
Type: Microsoft.VisualStudio.Modeling.PartitionPartition in which new elements should be created.
Type: Microsoft.VisualStudio.Modeling.ModelElement
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.
- 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.