XmlNodeChangedEventArgs Classe
Definição
Fornece dados para os eventos NodeChanged, NodeChanging, NodeInserted, NodeInserting, NodeRemoved e NodeRemoving.Provides data for the NodeChanged, NodeChanging, NodeInserted, NodeInserting, NodeRemoved and NodeRemoving events.
public ref class XmlNodeChangedEventArgs : EventArgs
public ref class XmlNodeChangedEventArgs
public class XmlNodeChangedEventArgs : EventArgs
public class XmlNodeChangedEventArgs
type XmlNodeChangedEventArgs = class
inherit EventArgs
type XmlNodeChangedEventArgs = class
Public Class XmlNodeChangedEventArgs
Inherits EventArgs
Public Class XmlNodeChangedEventArgs
- Herança
- Herança
-
XmlNodeChangedEventArgs
Comentários
O código C# a seguir mostra como usar o manipulador de eventos.The following C# code shows how to use the event handler.
//Add a new event handler.
XmlDocument doc = new XmlDocument();
doc.NodeInserted += new XmlNodeChangedEventHandler(NodeInsertedHandler);
//Define the event handler.
void NodeInsertedHandler(Object src, XmlNodeChangedEventArgs args)
{
Console.WriteLine("Node " + args.Node.Name + " inserted!!");
}
Observação
Se uma operação for composta por várias ações, isso resultará em vários eventos.If an operation is comprised of multiple actions, it results in multiple events. Por exemplo, uma AppendChild chamada pode ter que remover o nó que está sendo anexado de seu pai anterior.For example, an AppendChild call may have to remove the node being appended from its previous parent. Nesse caso, você verá um NodeRemoved evento seguido por um NodeInserted evento.In this case you will see a NodeRemoved event followed by a NodeInserted event.
Construtores
| XmlNodeChangedEventArgs(XmlNode, XmlNode, XmlNode, String, String, XmlNodeChangedAction) |
Inicializa uma nova instância da classe XmlNodeChangedEventArgs.Initializes a new instance of the XmlNodeChangedEventArgs class. |
Propriedades
| Action |
Obtém um valor que indica o tipo de evento de alteração de nó que está ocorrendo.Gets a value indicating what type of node change event is occurring. |
| NewParent |
Obtém o valor do ParentNode após a conclusão da operação.Gets the value of the ParentNode after the operation completes. |
| NewValue |
Obtém o novo valor do nó.Gets the new value of the node. |
| Node |
Obtém o XmlNode que está sendo adicionado, removido ou alterado.Gets the XmlNode that is being added, removed or changed. |
| OldParent |
Obtém o valor do ParentNode antes do início da operação.Gets the value of the ParentNode before the operation began. |
| OldValue |
Obtém o valor original do nó.Gets the original value of the node. |
Métodos
| Equals(Object) |
Determina se o objeto especificado é igual ao objeto atual.Determines whether the specified object is equal to the current object. (Herdado de Object) |
| GetHashCode() |
Serve como a função de hash padrão.Serves as the default hash function. (Herdado de Object) |
| GetType() |
Obtém o Type da instância atual.Gets the Type of the current instance. (Herdado de Object) |
| MemberwiseClone() |
Cria uma cópia superficial do Object atual.Creates a shallow copy of the current Object. (Herdado de Object) |
| ToString() |
Retorna uma cadeia de caracteres que representa o objeto atual.Returns a string that represents the current object. (Herdado de Object) |