ConfigurationElement.SerializeElement(XmlWriter, Boolean) Method

Definition

파생 클래스에서 구현될 때 구성 요소의 내용을 구성 파일에 씁니다.Writes the contents of this configuration element to the configuration file when implemented in a derived class.

protected:
 virtual bool SerializeElement(System::Xml::XmlWriter ^ writer, bool serializeCollectionKey);
protected public:
 virtual bool SerializeElement(System::Xml::XmlWriter ^ writer, bool serializeCollectionKey);
protected 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 Overridable Function SerializeElement (writer As XmlWriter, serializeCollectionKey As Boolean) As Boolean
Protected Friend Overridable Function SerializeElement (writer As XmlWriter, serializeCollectionKey As Boolean) As Boolean

Parameters

writer
XmlWriter

구성 파일에 작성하는 XmlWriter입니다.The XmlWriter that writes to the configuration file.

serializeCollectionKey
Boolean

컬렉션 키 속성만 serialize하면 true이고, 그렇지 않으면 false입니다.true to serialize only the collection key properties; otherwise, false.

Returns

Boolean

데이터가 실제로 serialize되었으면 true이고, 그렇지 않으면 false입니다.true if any data was actually serialized; otherwise, false.

Exceptions

현재 특성이 더 높은 구성 수준에서 잠겨 있는 경우The current attribute is locked at a higher configuration level.

Examples

다음 예제에서는 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

Applies to