Share via


DomainRelationshipXmlSerializer.TryCreateDerivedInstance Method

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.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.11.0.dll)

Syntax

'Declaration
Public MustOverride Function TryCreateDerivedInstance ( _
    serializationContext As SerializationContext, _
    reader As XmlReader, _
    partition As Partition _
) As ElementLink
public abstract ElementLink TryCreateDerivedInstance(
    SerializationContext serializationContext,
    XmlReader reader,
    Partition partition
)
public:
virtual ElementLink^ TryCreateDerivedInstance(
    SerializationContext^ serializationContext, 
    XmlReader^ reader, 
    Partition^ partition
) abstract
abstract TryCreateDerivedInstance : 
        serializationContext:SerializationContext * 
        reader:XmlReader * 
        partition:Partition -> ElementLink
public abstract function TryCreateDerivedInstance(
    serializationContext : SerializationContext, 
    reader : XmlReader, 
    partition : Partition
) : ElementLink

Parameters

  • reader
    Type: XmlReader

    XmlReader to read from.

Return Value

Type: Microsoft.VisualStudio.Modeling.ElementLink

Remarks

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.

.NET Framework Security

See Also

Reference

DomainRelationshipXmlSerializer Class

Microsoft.VisualStudio.Modeling Namespace