Skip to content

ICompositeListenerBuilder<TBaseNode>.With Method ​

Overloads ​

NameDescription
With(Listener<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<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.

With(Listener<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.

c#
public abstract ICompositeListenerBuilder<TBaseNode> With(Listener<TBaseNode> listener);

Parameters ​

NameTypeDescription
listenerListener<TBaseNode>The listener.

Returns ​

ICompositeListenerBuilder<TBaseNode>

The fluent builder.

With<TNode>(NodeListener<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.

c#
public abstract ICompositeListenerBuilder<TBaseNode> With<TNode>(NodeListener<TBaseNode, TNode> listener)
   where TNode : TBaseNode;

Type Parameters ​

NameDescription
TNodeThe type of the node listener listens to.

Parameters ​

NameTypeDescription
listenerNodeListener<TBaseNode, TNode>The listener.

Returns ​

ICompositeListenerBuilder<TBaseNode>

The fluent builder.