DataFlowExecutableSource<TOutput>

Class DataFlowExecutableSource<TOutput>

Base implementation for a source that can be executed.

Inherited Members
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
    public abstract class DataFlowExecutableSource<TOutput> : DataFlowSource<TOutput>, IDataFlowExecutableSource<TOutput>, IDataFlowSource<TOutput>, IDataFlowExecutableSource, IDataFlowSource, IDataFlowComponent, ILoggableTask
Type Parameters
NameDescription
TOutput

Fields

SourceTask

Declaration
    protected Task SourceTask
Field Value
TypeDescription
Task

Properties

Buffer

Declaration
    protected BufferBlock<TOutput> Buffer { get; set; }
Property Value
TypeDescription
BufferBlock<TOutput>

CompleteManually

Declaration
    protected virtual bool CompleteManually { get; set; }
Property Value
TypeDescription
bool

Limit

Reads data from the source until the limit is reached. Default is 0 (=no limit).

Declaration
    public int Limit { get; set; }
Property Value
TypeDescription
int

ProgressCountIsExceedingLimit

Declaration
    protected bool ProgressCountIsExceedingLimit { get; }
Property Value
TypeDescription
bool

ProgressCountIsInLimit

Declaration
    protected bool ProgressCountIsInLimit { get; }
Property Value
TypeDescription
bool

SourceBlock

SourceBlock from the underlying TPL.Dataflow which is used as output buffer for the component.

Declaration
    public override ISourceBlock<TOutput> SourceBlock { get; }
Property Value
TypeDescription
ISourceBlock<TOutput>
Overrides

Methods

Execute()

Starts the data flow for all connected components (also for other sources in the network). Waits until all destinations run to completion.

Declaration
    public void Execute()

Execute(CancellationToken)

Declaration
    public void Execute(CancellationToken cancellationToken)
Parameters
TypeNameDescription
CancellationTokencancellationToken

A cancellation token which can be used to cancel the task of component (and all subsequent components in the flow)

ExecuteAsync()

Starts the data flow asynchronously.

Declaration
    public Task ExecuteAsync()
Returns
TypeDescription
Task

Returns an awaitable task that completes or faults when the flow ran to completion.

ExecuteAsync(CancellationToken)

Starts the data flow asynchronously.

Declaration
    public Task ExecuteAsync(CancellationToken cancellationToken)
Parameters
TypeNameDescription
CancellationTokencancellationToken

A cancellation token which can be used to cancel the task of component (and all subsequent components in the flow)

Returns
TypeDescription
Task

Returns an awaitable task that completes or faults when the flow ran to completion.

InitComponent()

Declaration
    protected override void InitComponent()
Overrides

OnExecutionDoAsyncWork()

Declaration
    protected abstract void OnExecutionDoAsyncWork()

StartAsync(CancellationToken?)

Starts the source asynchronously. Will return only the task for the source component, which completes when all data was posted into the data flow.

Declaration
    public Task StartAsync(CancellationToken? cancellationToken = null)
Parameters
TypeNameDescription
CancellationToken?cancellationToken

A cancellation token which can be used to cancel the task of component (and all subsequent components in the flow)

Returns
TypeDescription
Task

Returns an awaitable task that completes or faults when the source ran to completion.

Implements