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.
Inherited Members
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
public class CustomDestination<TInput> : DataFlowDestination<TInput>, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent, ILoggableTaskType Parameters
| Name | Description |
|---|---|
| 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, int>)
Declaration
public CustomDestination(Action<TInput, int> writeAction)Parameters
| Type | Name | Description |
|---|---|---|
| Action<TInput, int> | writeAction | Sets the WriteAction |
Properties
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
| Type | Description |
|---|---|
| Action<TInput, int> |
WriteActionAsync
Async implementation of the WriteAction.
Declaration
public Func<TInput, int, Task> WriteActionAsync { get; set; }Property Value
| Type | Description |
|---|---|
| Func<TInput, int, Task> |
Methods
CheckParameter()
Declaration
protected override void CheckParameter()Overrides
CleanUpOnFaulted(Exception)
Declaration
protected override void CleanUpOnFaulted(Exception e)Parameters
| Type | Name | Description |
|---|---|---|
| Exception | e |
Overrides
CleanUpOnSuccess()
Declaration
protected override void CleanUpOnSuccess()Overrides
InitComponent()
Declaration
protected override void InitComponent()