Partager via


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

Public Write() method that serializes one ExtensionElement instance into XML.

Namespace:  Microsoft.VisualStudio.Modeling
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.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

  • 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

See Also

Reference

ExtensionElementSerializer Class

Write Overload

Microsoft.VisualStudio.Modeling Namespace