Skip to content

ICompositeVisitorBuilder<TBaseNode, TResult>.With Method ​

Overloads ​

NameDescription
With(Visitor<TBaseNode, TResult>)Add a visitor for the base node type. Useful to provide a fallback visitor when there is no visitor for the specific node type registered.
With<TNode>(NodeVisitor<TBaseNode, TNode, TResult>)Add a visitor for the specific node type TNode. This can be a base node type which will be used if there is no visitor for the specific node type registered.

With(Visitor<TBaseNode, TResult>) ​

Add a visitor for the base node type. Useful to provide a fallback visitor when there is no visitor for the specific node type registered.

c#
public abstract ICompositeVisitorBuilder<TBaseNode, TResult> With(Visitor<TBaseNode, TResult> visitor);

Parameters ​

NameTypeDescription
visitorVisitor<TBaseNode, TResult>The visitor.

Returns ​

ICompositeVisitorBuilder<TBaseNode, TResult>

The fluent builder.

With<TNode>(NodeVisitor<TBaseNode, TNode, TResult>) ​

Add a visitor for the specific node type TNode. This can be a base node type which will be used if there is no visitor for the specific node type registered.

c#
public abstract ICompositeVisitorBuilder<TBaseNode, TResult> With<TNode>(NodeVisitor<TBaseNode, TNode, TResult> visitor)
   where TNode : TBaseNode;

Type Parameters ​

NameDescription
TNodeThe type of the node visitor visits.

Parameters ​

NameTypeDescription
visitorNodeVisitor<TBaseNode, TNode, TResult>The visitor.

Returns ​

ICompositeVisitorBuilder<TBaseNode, TResult>

The fluent builder.