LabelShapeSerializer.TryCreateInstance Method (SerializationContext, XmlReader, Partition)

 

This method creates a correct instance of LabelShape based on the tag currently pointed by the reader. If the reader is positioned at a serialized LabelShape, a new LabelShape 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)

public override ModelElement TryCreateInstance(
	SerializationContext serializationContext,
	XmlReader reader,
	Partition partition
)

Parameters

serializationContext
Type: Microsoft.VisualStudio.Modeling.SerializationContext

Serialization context.

reader
Type: System.Xml.XmlReader

XmlReader to read serialized data from.

partition
Type: Microsoft.VisualStudio.Modeling.Partition

Partition in which new elements should be created.

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.

Return to top
Show: