ToolSerializer.Write Method (SerializationContext, ModelElement, XmlWriter, RootElementSettings)
Public Write() method that serializes one Tool instance into XML.
Namespace: Microsoft.VisualStudio.Modeling.DslDefinition
Assembly: Microsoft.VisualStudio.Modeling.Sdk.DslDefinition.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.DslDefinition.10.0.dll)
Syntax
'Déclaration
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
Serialization context.
- element
Type: Microsoft.VisualStudio.Modeling.ModelElement
Tool instance to be serialized.
- writer
Type: System.Xml.XmlWriter
XmlWriter to write serialized data to.
- rootElementSettings
Type: Microsoft.VisualStudio.Modeling.RootElementSettings
The root element settings if the passed in element is serialized as a root element in the XML. The root element contains additional information like schema target namespace, version, etc. This should only be passed for root-level elements. Null should be passed for rest elements (and ideally call the Write() method without this parameter).
.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.