ConfigurationElement.DeserializeElement(XmlReader, Boolean) ConfigurationElement.DeserializeElement(XmlReader, Boolean) ConfigurationElement.DeserializeElement(XmlReader, Boolean) ConfigurationElement.DeserializeElement(XmlReader, Boolean) Method

Definition

Liest XML aus der Konfigurationsdatei.Reads XML from the configuration file.

protected public:
 virtual void DeserializeElement(System::Xml::XmlReader ^ reader, bool serializeCollectionKey);
protected internal virtual void DeserializeElement (System.Xml.XmlReader reader, bool serializeCollectionKey);
abstract member DeserializeElement : System.Xml.XmlReader * bool -> unit
override this.DeserializeElement : System.Xml.XmlReader * bool -> unit
Protected Friend Overridable Sub DeserializeElement (reader As XmlReader, serializeCollectionKey As Boolean)

Parameter

reader
XmlReader XmlReader XmlReader XmlReader

Der XmlReader, der aus der Konfigurationsdatei liest.The XmlReader that reads from the configuration file.

serializeCollectionKey
Boolean Boolean Boolean Boolean

true, um nur die Auflistungsschlüsseleigenschaften zu serialisieren, andernfalls false.true to serialize only the collection key properties; otherwise, false.

Ausnahmen

Das zu lesende Element ist gesperrt.The element to read is locked.

- oder --or-

Ein Attribut des aktuellen Knotens wird nicht erkannt.An attribute of the current node is not recognized.

- oder --or-

Der Sperrstatus des aktuellen Knotens kann nicht bestimmt werden.The lock status of the current node cannot be determined.

Beispiele

Das folgende Beispiel veranschaulicht das Erweitern der DeserializeElement Methode.The following example demonstrates how to extend the DeserializeElement method.

protected override void DeserializeElement(
   System.Xml.XmlReader reader, 
    bool serializeCollectionKey)
{
    base.DeserializeElement(reader, 
        serializeCollectionKey);
    // You can your custom processing code here.
}
Protected Overrides Sub DeserializeElement(ByVal reader _
    As System.Xml.XmlReader, _
    ByVal serializeCollectionKey As Boolean)

    MyBase.DeserializeElement(reader, _
        serializeCollectionKey)
    ' Enter your custom processing code here.
End Sub 'DeserializeElement

Gilt für: