Show / Hide Table of Contents

Class Pipeline<TIn, TOut>

Defines a multi-threaded pipeline that runs in-process.

Inheritance
System.Object
FlowModelObject
WorkItem
ExecutableWorkBase
ExecutableWorkBase<TIn, TOut>
Pipeline<TIn, TOut>
Implements
IFlowModelItem
IExecutableWork<TIn, TOut>
IComputationalWork
IPipeline
ICanBuildComputationalWork
Inherited Members
ExecutableWorkBase<TIn, TOut>.Execute(TIn, IExecutionContext)
ExecutableWorkBase<TIn, TOut>.Process(TIn, IExecutionContext)
ExecutableWorkBase<TIn, TOut>.Process(Object, IExecutionContext)
ExecutableWorkBase.Source
ExecutableWorkBase.CanExecute()
ExecutableWorkBase.Execute(Object, IExecutionContext)
ExecutableWorkBase.Complete(IExecutionContext, Object, String)
ExecutableWorkBase.Fail(IExecutionContext, String, Exception)
ExecutableWorkBase.Process(Object, IExecutionContext)
ExecutableWorkBase.CreateRootExecutionContext()
WorkItem.Tag
WorkItem.JobId
WorkItem.ParentId
WorkItem.Id
WorkItem.GetParent()
DNVGL.One.Compute.Core.FlowModel.WorkItem.Select<T>(Func<, >)
DNVGL.One.Compute.Core.FlowModel.WorkItem.Traverse(Action<, >, DNVGL.One.Compute.Core.FlowModel.WorkItem)
DNVGL.One.Compute.Core.FlowModel.WorkItem.FindItems(Func<, >, System.Boolean)
WorkItem.OnInitialize(Job)
WorkItem.ToString()
FlowModelObject.BatchNumber
FlowModelObject.Properties
FlowModelObject.PropertiesContent
FlowModelObject.Item[String]
FlowModelObject.UpdateProperties(String)
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 Source

Pipeline(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.

Properties

View Source

NumberOfChannels

Gets or sets the number of parallel processing channels.

Declaration
public int NumberOfChannels { get; set; }
Property Value
Type Description
System.Int32

The number of processing channels.

View Source

PipelineSource

Gets the pipeline source.

Declaration
public IPipelineSource<TIn> PipelineSource { get; }
Property Value
Type Description
IPipelineSource<TIn>

The pipeline source.

View Source

Sink

Gets the pipeline sink.

Declaration
public IPipelineSink<TOut> Sink { get; }
Property Value
Type Description
IPipelineSink<TOut>

The pipeline sink.

View Source

Work

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.

Methods

View Source

Build(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.

View Source

GetDescendants()

Gets the descendants.

Declaration
public override IEnumerable<WorkItem> GetDescendants()
Returns
Type Description
IEnumerable<WorkItem>

Descendant items.

Overrides
ExecutableWorkBase.GetDescendants()
View Source

Process(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.

Overrides
DNVGL.One.Compute.WorkExecution.ExecutionModel.ExecutableWorkBase<TIn, TOut>.Process(TIn, DNVGL.One.Compute.WorkExecution.ExecutionModel.IExecutionContext)

Explicit Interface Implementations

View Source

IPipeline.Push(Object)

Pushes the specified input to be processed by the pipeline.

Declaration
void IPipeline.Push(object input)
Parameters
Type Name Description
System.Object input

The input.

Implements

IFlowModelItem
IExecutableWork<TIn, TOut>
IComputationalWork
IPipeline
ICanBuildComputationalWork

Extension Methods

WorkItemExtensions.BuildExecutableWork(WorkItem)

See Also

ExecutableWorkBase<TIn, TOut>
IPipeline
ICanBuildComputationalWork
  • View Source
In This Article
Back to top Copyright © DNV AS. All rights reserved.