Share via


MoveableDecoratorHostShapeSerializer.Write Method (SerializationContext, ModelElement, XmlWriter, RootElementSettings)

Unlike DecoratorHostShape, MoveableDecoratorHostShape does need to be serialized to preserve the location information. However, due to the special handling of decorators and host shapes in CDS, the normal generated serialization won't work. So we short-circuit the generated serializer here, and handle the serialization in ShapeElementSerializer.CustomWriteElements() instead.

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

Syntax

'Declaration
Public Overrides Sub Write ( _
    serializationContext As SerializationContext, _
    element As ModelElement, _
    writer As XmlWriter, _
    rootElementSettings As RootElementSettings _
)
public override void Write(
    SerializationContext serializationContext,
    ModelElement element,
    XmlWriter writer,
    RootElementSettings rootElementSettings
)
public:
virtual void Write(
    SerializationContext^ serializationContext, 
    ModelElement^ element, 
    XmlWriter^ writer, 
    RootElementSettings^ rootElementSettings
) override
abstract Write : 
        serializationContext:SerializationContext * 
        element:ModelElement * 
        writer:XmlWriter * 
        rootElementSettings:RootElementSettings -> unit 
override Write : 
        serializationContext:SerializationContext * 
        element:ModelElement * 
        writer:XmlWriter * 
        rootElementSettings:RootElementSettings -> unit 
public override function Write(
    serializationContext : SerializationContext, 
    element : ModelElement, 
    writer : XmlWriter, 
    rootElementSettings : RootElementSettings
)

Parameters

.NET Framework Security

See Also

Reference

MoveableDecoratorHostShapeSerializer Class

Write Overload

Microsoft.VisualStudio.Modeling.Diagrams Namespace