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.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.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
- serializationContext
Type: Microsoft.VisualStudio.Modeling.SerializationContext
- element
Type: Microsoft.VisualStudio.Modeling.ModelElement
- writer
Type: System.Xml.XmlWriter
- rootElementSettings
Type: Microsoft.VisualStudio.Modeling.RootElementSettings
.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.