Skip to content

NodeListener<TContext, TBaseNode, TNode> Class ​

Definition ​

A Listener<TContext, TNode> that only listens to nodes of a specific type. All other nodes will be ignored. The listener will still proceed to descendants of nodes that aren't listened too, that is, the entire tree will be walked.

c#
public abstract class NodeListener<TContext, TBaseNode, TNode> : Listener<TContext, TBaseNode>
   where TBaseNode : Node<TBaseNode>
   where TNode : TBaseNode

View source

Type Parameters ​

NameDescription
TContextThe type of the context object.
TBaseNodeThe base type of all nodes in the tree.
TNodeThe type of the nodes to listen to.

Constructors ​

NameDescription
NodeListener()

Methods ​

NameDescription
AfterListenToNode(TContext, TBaseNode)Called after a node and its descendants have been listened to.
AfterListenToNode(TContext, TNode)Called after a node and its descendants have been listened to.
BeforeListenToNode(TContext, TBaseNode)Called before a node and its descendants are listened to.
BeforeListenToNode(TContext, TNode)Called before a node and its descendants are listened to.
ListenToNode(TContext, TBaseNode)Called when the node is listened to.
ListenToNode(TContext, TNode)Called when the node is listened to.
ShouldListenToDescendants(TContext, TBaseNode)Return a value indicating whether child nodes should be listened to or not. Defaults to true.
ShouldListenToDescendants(TContext, TNode)Return a value indicating whether child nodes should be listened to or not. Defaults to true.