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
System.Object
CustomDestination<TInput>
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 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()

CustomDestination(Action<TInput, Int32>)

Declaration
    public CustomDestination(Action<TInput, int> writeAction)
Parameters
TypeNameDescription
System.Action<TInput, System.Int32>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
System.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<TInput, System.Int32>

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

InitComponent()

Declaration
    protected override void InitComponent()
Overrides
ETLBox.DataFlow.DataFlowDestination<TInput>.InitComponent()

Implements