Class Pipeline<TIn, TOut>
Defines a multi-threaded pipeline that runs in-process.
Implements
Inherited Members
Namespace: DNVGL.One.Compute.WorkExecution.ExecutionModel
Assembly: DNVGL.One.Compute.WorkExecution.dll
Syntax
public class Pipeline<TIn, TOut> : ExecutableWorkBase<TIn, TOut>, IFlowModelItem, IExecutableWork<TIn, TOut>, IComputationalWork, IPipeline, ICanBuildComputationalWork
Type Parameters
| Name | Description |
|---|---|
| TIn | The type of the input. |
| TOut | The type of the output. |
Constructors
View SourcePipeline(IPipelineSource<TIn>, SequentialWork, IPipelineSink<TOut>)
Initializes a new instance of the Pipeline<TIn, TOut> class.
Declaration
public Pipeline(IPipelineSource<TIn> source, SequentialWork work, IPipelineSink<TOut> sink)
Parameters
| Type | Name | Description |
|---|---|---|
| IPipelineSource<TIn> | source | The source. |
| SequentialWork | work | The sequential work of processing each item provided by the source. |
| IPipelineSink<TOut> | sink | The sink that receives the output of the pipeline. |
See Also
Properties
View SourceNumberOfChannels
Gets or sets the number of parallel processing channels.
Declaration
public int NumberOfChannels { get; set; }
Property Value
| Type | Description |
|---|---|
| int | The number of processing channels. |
See Also
View SourcePipelineSource
Gets the pipeline source.
Declaration
public IPipelineSource<TIn> PipelineSource { get; }
Property Value
| Type | Description |
|---|---|
| IPipelineSource<TIn> | The pipeline source. |
See Also
View SourceSink
Gets the pipeline sink.
Declaration
public IPipelineSink<TOut> Sink { get; }
Property Value
| Type | Description |
|---|---|
| IPipelineSink<TOut> | The pipeline sink. |
See Also
View SourceWork
Gets the work performed by the processing pipeline.
Declaration
public SequentialWork Work { get; }
Property Value
| Type | Description |
|---|---|
| SequentialWork | The work performed by the processing pipeline. |
See Also
Methods
View SourceBuild(IExecutableWorkBuilder)
Builds computational work using the given IExecutableWorkBuilder.
Declaration
public IComputationalWork Build(IExecutableWorkBuilder workBuilder)
Parameters
| Type | Name | Description |
|---|---|---|
| IExecutableWorkBuilder | workBuilder | The work builder. |
Returns
| Type | Description |
|---|---|
| IComputationalWork | An IComputationalWork representation of the WorkItem. |
See Also
View SourceGetDescendants()
Gets the descendants.
Declaration
public override IEnumerable<WorkItem> GetDescendants()
Returns
| Type | Description |
|---|---|
| IEnumerable<WorkItem> | Descendant items. |
Overrides
See Also
View SourceProcess(TIn, IExecutionContext)
Processes the specified input.
Declaration
protected override TOut Process(TIn input, IExecutionContext executionContext)
Parameters
| Type | Name | Description |
|---|---|---|
| TIn | input | The input. |
| IExecutionContext | executionContext | The execution context. |
Returns
| Type | Description |
|---|---|
| TOut | Processing result. May be null. |