DomainRelationshipXmlSerializer::TryCreateDerivedInstance Method (SerializationContext^, XmlReader^, Partition^)

 

With the given XmlReader, check if it is currently pointing to a serialized instance that derives from the ElementLink this serializer can handle. If so, create an instance of the derived ElementLink instance in the given Partition; otherwise return NULL.F1126

Namespace:   Microsoft.VisualStudio.Modeling
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.12.0.dll)

public:
virtual ElementLink^ TryCreateDerivedInstance(
	SerializationContext^ serializationContext,
	XmlReader^ reader,
	Partition^ partition
) abstract

Parameters

serializationContext
Type: Microsoft.VisualStudio.Modeling::SerializationContext^

Serialization context.

reader
Type: System.Xml::XmlReader^

XmlReader to read from.

partition
Type: Microsoft.VisualStudio.Modeling::Partition^

Partition in which the new link will be created.

Note: that this method only tries to create the derived ElementLink instance, without actually deserializing it. The deserialization will be done by the Read() methods. There are two reasons for this separation: 1) We may need to link the created link to its source role player before we can deserializing it properly. 2) The deserialization can be customized.

Return to top
Show: