ICompositeListenerBuilder<TContext, TBaseNode>.With Method
Overloads
| Name | Description |
|---|---|
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>(Listener<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. |
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.
public abstract ICompositeListenerBuilder<TContext, TBaseNode> With(Listener<TContext, TBaseNode> listener);
Parameters
| Name | Type | Description |
|---|---|---|
listener |
Listener<TContext, TBaseNode> |
The listener. |
Returns
ICompositeListenerBuilder<TContext, TBaseNode>
The fluent builder.
With<TNode>(Listener<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.
public abstract ICompositeListenerBuilder<TContext, TBaseNode> With<TNode>(Listener<TContext, TBaseNode, TNode> listener)
where TNode : TBaseNode;
Type Parameters
| Name | Description |
|---|---|
TNode |
The type of the node listener listens to. |
Parameters
| Name | Type | Description |
|---|---|---|
listener |
Listener<TContext, TBaseNode, TNode> |
The listener. |
Returns
ICompositeListenerBuilder<TContext, TBaseNode>
The fluent builder.