CustomSource

Class CustomSource

Define your own source block. This block generates data from a your own custom written functions.

Inherited Members
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
    public class CustomSource : CustomSource<ExpandoObject>, IDataFlowExecutableSource<ExpandoObject>, IDataFlowSource<ExpandoObject>, IDataFlowExecutableSource, IDataFlowSource, IDataFlowComponent, ILoggableTask
Examples
   List<string> Data = new List<string>()
                        {
                            "Test1", "Test2", "Test3"
                        };
                        var source = new CustomSource<MyRow>();
                        source.ReadFunc = progressCount =>
                        {
                            return new MyRow()
                            {
                                Id = progressCount + 1,
                                Value = Data[progressCount]
                            };    
                           return result;
                        };
                       source.ReadCompletedFunc =  progressCount => progressCount >= Data.Count;

Constructors

CustomSource()

Declaration
    public CustomSource()

CustomSource(Func<int, ExpandoObject>, Predicate<int>)

Declaration
    public CustomSource(Func<int, ExpandoObject> readFunc, Predicate<int> readingCompleted)
Parameters
TypeNameDescription
Func<int, ExpandoObject>readFunc
Predicate<int>readingCompleted

Implements