Skip to content

ICompositeVisitorBuilder<TContext, TBaseNode, TResult>.With Method

Overloads

Name Description
With(Visitor<TContext, 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<TContext, 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<TContext, 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.

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

Parameters

Name Type Description
visitor Visitor<TContext, TBaseNode, TResult> The visitor.

Returns

ICompositeVisitorBuilder<TContext, TBaseNode, TResult>

The fluent builder.

With<TNode>(NodeVisitor<TContext, 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.

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

Type Parameters

Name Description
TNode The type of the node visitor visits.

Parameters

Name Type Description
visitor NodeVisitor<TContext, TBaseNode, TNode, TResult> The visitor.

Returns

ICompositeVisitorBuilder<TContext, TBaseNode, TResult>

The fluent builder.