Class CustomBatchSource<TOutput>

Define your own source block. This block allows you to read batches of data from your own custom written functions, which are then send subsequently into your data flow.

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

Type of outgoing data.

Constructors

CustomBatchSource()

Declaration
    public CustomBatchSource()

CustomBatchSource(Func<int, IEnumerable<TOutput>>, Predicate<int>)

Declaration
    public CustomBatchSource(Func<int, IEnumerable<TOutput>> readBatchFunc, Predicate<int> readingCompleted)
Parameters
TypeNameDescription
Func<int, IEnumerable<TOutput>>readBatchFunc

Sets the ReadBatchFunc

Predicate<int>readingCompleted

Sets the ReadingCompleted

Properties

ReadBatchFunc

The function that returns a batch of data row as output. An integer value with the current progress count is the input of the function.

Declaration
    public Func<int, IEnumerable<TOutput>> ReadBatchFunc { get; set; }
Property Value
TypeDescription
Func<int, IEnumerable<TOutput>>

ReadingCompleted

This predicate returns true when all rows for the flow are successfully returned from the ReadBatchFunc. An integer value with the current progress count is the input of the predicate.

Declaration
    public Predicate<int> ReadingCompleted { get; set; }
Property Value
TypeDescription
Predicate<int>

Methods

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides

CleanUpOnFaulted(Exception)

Declaration
    protected override void CleanUpOnFaulted(Exception e)
Parameters
TypeNameDescription
Exceptione
Overrides

CleanUpOnSuccess()

Declaration
    protected override void CleanUpOnSuccess()
Overrides

OnExecutionDoAsyncWork()

Declaration
    protected override void OnExecutionDoAsyncWork()
Overrides

Implements