Class CustomDestination<TInput>

Define your own destination block. This block accepts all data from the flow and sends each incoming row to your custom Action, along with a count of processed rows.

Inheritance
object
CustomDestination<TInput>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: ETLBox.DataFlow.Connectors
Assembly: ETLBox.dll
Syntax
    public class CustomDestination<TInput> : DataFlowDestination<TInput>, ILoggableTask, IDataFlowLogging, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent
Type Parameters
NameDescription
TInput

Type of ingoing data.

Examples
List<MyRow> rows = new List<MyRow>();
var dest = new CustomDestination<MyRow>();
dest.WriteAction = (row, progressCount) => rows.Add(row);

Constructors

CustomDestination()

Declaration
    public CustomDestination()
Examples
List<MyRow> rows = new List<MyRow>();
var dest = new CustomDestination<MyRow>();
dest.WriteAction = (row, progressCount) => rows.Add(row);

CustomDestination(Action<TInput, int>)

Declaration
    public CustomDestination(Action<TInput, int> writeAction)
Parameters
TypeNameDescription
System.Action<T1, T2><TInput, int>writeAction

Sets the WriteAction

Properties

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
string
Overrides

WriteAction

Each row that the CustomDestination receives is send into this Action as first input value. The second input value is the current progress count.

Declaration
    public Action<TInput, int> WriteAction { get; set; }
Property Value
TypeDescription
System.Action<T1, T2><TInput, int>

Methods

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides
Examples
List<MyRow> rows = new List<MyRow>();
var dest = new CustomDestination<MyRow>();
dest.WriteAction = (row, progressCount) => rows.Add(row);

CleanUpOnFaulted(Exception)

Declaration
    protected override void CleanUpOnFaulted(Exception e)
Parameters
TypeNameDescription
System.Exceptione
Overrides
Examples
List<MyRow> rows = new List<MyRow>();
var dest = new CustomDestination<MyRow>();
dest.WriteAction = (row, progressCount) => rows.Add(row);

CleanUpOnSuccess()

Declaration
    protected override void CleanUpOnSuccess()
Overrides
Examples
List<MyRow> rows = new List<MyRow>();
var dest = new CustomDestination<MyRow>();
dest.WriteAction = (row, progressCount) => rows.Add(row);

InitComponent()

Declaration
    protected override void InitComponent()
Overrides
ETLBox.DataFlow.DataFlowDestination<TInput>.InitComponent()
Examples
List<MyRow> rows = new List<MyRow>();
var dest = new CustomDestination<MyRow>();
dest.WriteAction = (row, progressCount) => rows.Add(row);

Implements