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

Definición

Lee XML del archivo de configuración.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)

Parámetros

reader
XmlReader XmlReader XmlReader XmlReader

Objeto XmlReader que lee el archivo de configuración.The XmlReader that reads from the configuration file.

serializeCollectionKey
Boolean Boolean Boolean Boolean

true para serializar sólo las propiedades clave de la colección; de lo contrario, false.true to serialize only the collection key properties; otherwise, false.

Excepciones

Se bloquea el elemento de lectura.The element to read is locked.

o bien-or-

No se reconoce un atributo del nodo actual.An attribute of the current node is not recognized.

O bien-or-

No se puede determinar el estado de bloqueo del nodo actual.The lock status of the current node cannot be determined.

Ejemplos

En el ejemplo siguiente se muestra cómo extender el método DeserializeElement.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

Se aplica a