ConfigurationElement.DeserializeElement(XmlReader, Boolean) Método

Definição

Lê o XML do arquivo de configuração.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

O XmlReader que lê do arquivo de configuração.The XmlReader that reads from the configuration file.

serializeCollectionKey
Boolean

true para serializar apenas as propriedades de chave da coleção; caso contrário, false.true to serialize only the collection key properties; otherwise, false.

Exceções

O elemento a ler está bloqueado.The element to read is locked.

- ou --or-

Um atributo do nó atual não é reconhecido.An attribute of the current node is not recognized.

- ou --or-

O status de bloqueio do nó atual não pode ser determinado.The lock status of the current node cannot be determined.

Exemplos

O exemplo a seguir demonstra como estender o 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

Aplica-se a