Skip to content

NodeReplacer<TContext, TBaseNode, TNode> Class ​

Definition ​

An OrderedNodeProcessor<TContext, TBaseNode, TNode> for optionally replacing nodes of a specific type in a tree.

c#
public abstract class NodeReplacer<TContext, TBaseNode, TNode> : OrderedNodeProcessor<TContext, TBaseNode, TNode>, IOrderedProcessor<TContext, TBaseNode>
   where TBaseNode : Node<TBaseNode>
   where TNode : TBaseNode

View source

Type Parameters ​

NameDescription
TContextThe type of the processing context.
TBaseNodeThe base type of nodes in the tree.
TNodeThe type of nodes to replace.

Constructors ​

NameDescription
NodeReplacer()

Methods ​

NameDescription
Process(TContext, TNode)Performs processing on the specified node. Does not process any descendants.
Replace(TContext, TNode)Optionally replace the specified node.