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.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.12.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
serializationContext
Type: Microsoft.VisualStudio.Modeling.SerializationContextSerialization context.
reader
Type: System.Xml.XmlReaderXmlReader to read from.
partition
Type: Microsoft.VisualStudio.Modeling.PartitionPartition in which the new link will be created.
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
- 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.