CompositeListener<TBaseNode> Class ​
Definition ​
A Listener<TNode> built from multiple other listeners that listen to specific node types and do not take a context object. When a node is reached the listener with the most specific type for the node will be used. Only a single listener will ever listen to a node. If no suitable listener is found the node will be ignored but it's descendants will still be listened to.
c#
public sealed class CompositeListener<TBaseNode> : Listener<TBaseNode>, ICompositeListenerBuilder<TBaseNode>
where TBaseNode : Node<TBaseNode>Type Parameters ​
| Name | Description |
|---|---|
TBaseNode | The base type of all nodes in the tree. |
Methods ​
| Name | Description |
|---|---|
AfterListenToNode(TBaseNode) | Called after a node and its descendants have been listened to. |
BeforeListenToNode(TBaseNode) | Called before a node and its descendants are listened to. |
Build() | Fluent interface to build a CompositeListener<TBaseNode>. |
ListenToNode(TBaseNode) | Called when the node is listened to. |
ShouldListenToDescendants(TBaseNode) | Return a value indicating whether child nodes should be listened to or not. Defaults to true. |