ConfigurationElement.SerializeElement(XmlWriter, Boolean) ConfigurationElement.SerializeElement(XmlWriter, Boolean) ConfigurationElement.SerializeElement(XmlWriter, Boolean) ConfigurationElement.SerializeElement(XmlWriter, Boolean) Method

定義

派生クラスに実装されている場合、この構成要素の内容を構成ファイルに書き込みます。Writes the contents of this configuration element to the configuration file when implemented in a derived class.

protected public:
 virtual bool SerializeElement(System::Xml::XmlWriter ^ writer, bool serializeCollectionKey);
protected internal virtual bool SerializeElement (System.Xml.XmlWriter writer, bool serializeCollectionKey);
abstract member SerializeElement : System.Xml.XmlWriter * bool -> bool
override this.SerializeElement : System.Xml.XmlWriter * bool -> bool
Protected Friend Overridable Function SerializeElement (writer As XmlWriter, serializeCollectionKey As Boolean) As Boolean

パラメーター

writer
XmlWriter XmlWriter XmlWriter XmlWriter

構成ファイルへの書き込みを行う XmlWriterThe XmlWriter that writes to the configuration file.

serializeCollectionKey
Boolean Boolean Boolean Boolean

コレクションのキー プロパティだけをシリアル化する場合は true、それ以外の場合は falsetrue to serialize only the collection key properties; otherwise, false.

戻り値

データが実際にシリアル化された場合は true。それ以外の場合は falsetrue if any data was actually serialized; otherwise, false.

例外

現在の属性は、より高い構成レベルでロックされています。The current attribute is locked at a higher configuration level.

次の例は、 SerializeElementメソッドを拡張する方法を示しています。The following example shows how to extend the SerializeElement method.

protected override bool SerializeElement(
    System.Xml.XmlWriter writer, 
    bool serializeCollectionKey)
{
    bool ret = base.SerializeElement(writer, 
        serializeCollectionKey);
    // You can enter your custom processing code here.
    return ret;

}
Protected Overrides Function SerializeElement(ByVal writer _
    As System.Xml.XmlWriter, _
    ByVal serializeCollectionKey As Boolean) As Boolean

    Dim ret As Boolean = _
        MyBase.SerializeElement(writer, serializeCollectionKey)
    ' Enter your custom processing code here.
    Return ret
End Function 'SerializeElement

適用対象