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.

Inheritance
System.Object
CustomBatchSource<TOutput>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ETLBox.DataFlow.Connectors
Assembly: ETLBox.dll
Syntax
    public class CustomBatchSource<TOutput> : DataFlowExecutableSource<TOutput>, ILoggableTask, IDataFlowLogging, IDataFlowExecutableSource<TOutput>, IDataFlowSource<TOutput>, IDataFlowSource, IDataFlowComponent, IDataFlowExecutableSource
Type Parameters
NameDescription
TOutput

Type of outgoing data.

Constructors

CustomBatchSource()

Declaration
    public CustomBatchSource()

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

Declaration
    public CustomBatchSource(Func<int, IEnumerable<TOutput>> readBatchFunc, Predicate<int> readingCompleted)
Parameters
TypeNameDescription
System.Func<System.Int32, System.Collections.Generic.IEnumerable<TOutput>>readBatchFunc

Sets the ReadBatchFunc

System.Predicate<System.Int32>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
System.Func<System.Int32, System.Collections.Generic.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
System.Predicate<System.Int32>

TaskName

A name to identify the task or component. Every component or task comes with a default name that can be overwritten.

Declaration
    public override string TaskName { get; set; }
Property Value
TypeDescription
System.String
Overrides

Methods

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides

CleanUpOnFaulted(Exception)

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

CleanUpOnSuccess()

Declaration
    protected override void CleanUpOnSuccess()
Overrides

OnExecutionDoAsyncWork()

Declaration
    protected override void OnExecutionDoAsyncWork()
Overrides
ETLBox.DataFlow.DataFlowExecutableSource<TOutput>.OnExecutionDoAsyncWork()

OnExecutionDoSynchronousWork()

Declaration
    protected override void OnExecutionDoSynchronousWork()
Overrides
ETLBox.DataFlow.DataFlowExecutableSource<TOutput>.OnExecutionDoSynchronousWork()

Implements