Skip to content

ICompositeListenerBuilder<TContext, TBaseNode> Interface ​

Definition ​

Fluent interface to build a CompositeListener<TContext, TBaseNode>.

c#
public abstract interface ICompositeListenerBuilder<TContext, TBaseNode>
   where TBaseNode : Node<TBaseNode>

Type Parameters ​

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

Methods ​

NameDescription
ToListener()Builds the CompositeListener<TContext, TBaseNode>.
With(Listener<TContext, TBaseNode>)Add a listener for the base node type. Useful to provide a fallback listener when there is no listener for the specific node type registered.
With<TNode>(NodeListener<TContext, TBaseNode, TNode>)Add a listener for the specific node type TNode. This can be a base node type which will be used if there is no listener for the specific node type registered.