ExpandCollapseDecoratorSerializer.Write(SerializationContext, ModelElement, XmlWriter, RootElementSettings) 方法

定義

Public Write () 方法會將一個 ExpandCollapseDecorator 實例序列化為 XML。Public Write() method that serializes one ExpandCollapseDecorator instance into XML.

public:
 override void Write(Microsoft::VisualStudio::Modeling::SerializationContext ^ serializationContext, Microsoft::VisualStudio::Modeling::ModelElement ^ element, System::Xml::XmlWriter ^ writer, Microsoft::VisualStudio::Modeling::RootElementSettings ^ rootElementSettings);
public override void Write (Microsoft.VisualStudio.Modeling.SerializationContext serializationContext, Microsoft.VisualStudio.Modeling.ModelElement element, System.Xml.XmlWriter writer, Microsoft.VisualStudio.Modeling.RootElementSettings rootElementSettings);
override this.Write : Microsoft.VisualStudio.Modeling.SerializationContext * Microsoft.VisualStudio.Modeling.ModelElement * System.Xml.XmlWriter * Microsoft.VisualStudio.Modeling.RootElementSettings -> unit
Public Overrides Sub Write (serializationContext As SerializationContext, element As ModelElement, writer As XmlWriter, rootElementSettings As RootElementSettings)

參數

serializationContext
SerializationContext

序列化內容。Serialization context.

element
ModelElement

要序列化的 ExpandCollapseDecorator 實例。ExpandCollapseDecorator instance to be serialized.

writer
XmlWriter

要將序列化資料寫入其中的 XmlWriter。XmlWriter to write serialized data to.

rootElementSettings
RootElementSettings

如果傳入的元素序列化為 XML 中的根項目,則為根項目設定。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 應該傳遞給 rest 元素 (而且在理想的情況下,不需要這個參數就能呼叫 Write () 方法) 。Null should be passed for rest elements (and ideally call the Write() method without this parameter).

適用於