Skip to content

Visitor<TNode, TResult>.Visit Method ​

Definition ​

Visits the specified node and returns the result.

c#
public new TResult? Visit(TNode node);

View source

Parameters ​

NameTypeDescription
nodeTNodeThe node to visit.

Returns ​

TResult

The result of visiting node.

Remarks ​

If this visitor has been registered with a CompositeVisitor<TBaseNode, TResult> then the node will be dispatched through that composite, so that a visitor for one node type can visit children of other node types. Visitors should therefore always use this method, rather than VisitNode(TNode), to visit children.