Pipeline<TContext, TBaseNode> Class
Definition
A pipeline to process nodes in a tree with a context. A pipeline consists of multiple named stages, each of which has one or more Processor<TContext, TBaseNode>s running in serial or parallel. Stages can optionally specify whether pipeline processing should continue once the stage has completed. By default, processing will not continue if there are any errors in the tree.
public sealed class Pipeline<TContext, TBaseNode>
where TBaseNode : Node<TBaseNode>
View source
Type Parameters
| Name |
Description |
TContext |
The type of the context. |
TBaseNode |
The base type of nodes in the tree. |
Properties
| Name |
Description |
Stages |
The stages in the pipeline. |
Methods
| Name |
Description |
Build(Action<PipelineBuilder<TContext, TBaseNode>>) |
Fluent interface to build a Pipeline<TContext, TBaseNode>. |
Run(TContext, TBaseNode, TBaseNode) |
Runs the pipeline on the specified root node, returning the potentially new root via an out parameter. |
Run(TContext, TBaseNode, TBaseNode, String) |
Runs the pipeline on the specified root node, returning the potentially new root and last stage run via out parameters. |
Run(TContext, TBaseNode) |
Runs the pipeline on the specified root node, returning a tuple with the result, the potentially replaced root node and the last stage run. |