共用方式為


SwimLaneHasBaseSwimLaneSerializer.TryCreateInstance Method

This method creates a correct instance of SwimLaneHasBaseSwimLane based on the tag currently pointed by the reader. If the reader is positioned at a serialized SwimLaneHasBaseSwimLane, a new SwimLaneHasBaseSwimLane instance will be created in the given partition, otherwise null is returned.

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

Syntax

'宣告
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

Parameters

Return Value

Type: Microsoft.VisualStudio.Modeling.ModelElement
Created SwimLaneHasBaseSwimLane instance, or null if the reader is not pointing to a serialized SwimLaneHasBaseSwimLane instance.

Remarks

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.

.NET Framework Security

See Also

Reference

SwimLaneHasBaseSwimLaneSerializer Class

Microsoft.VisualStudio.Modeling.DslDefinition Namespace