Title here
Summary here
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.
public class CustomDestination<TInput> : DataFlowDestination<TInput>, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent, ILoggableTask
Name | Description |
---|---|
TInput | Type of ingoing data. |
List<MyRow> rows = new List<MyRow>();
var dest = new CustomDestination<MyRow>();
dest.WriteAction = (row, progressCount) => rows.Add(row);
public CustomDestination()
public CustomDestination(Action<TInput, int> writeAction)
Type | Name | Description |
---|---|---|
Action<TInput, int> | writeAction | Sets the 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.
public Action<TInput, int> WriteAction { get; set; }
Type | Description |
---|---|
Action<TInput, int> |
Async implementation of the WriteAction.
public Func<TInput, int, Task> WriteActionAsync { get; set; }
Type | Description |
---|---|
Func<TInput, int, Task> |
protected override void CheckParameter()
protected override void CleanUpOnFaulted(Exception e)
Type | Name | Description |
---|---|---|
Exception | e |
protected override void CleanUpOnSuccess()
protected override void InitComponent()