Class RowActionTargetFactory
Factory methods that create a
RowActionTarget<TInput>
dataflow worker, which executes a callback on each incoming row from the Input
port.
The callback is passed the row as a parameter, and does not itself take rows
from the Input
.
Also see the RowActionTarget example.
Note: The input port uses the Default policy. Consider whether this is appropriate, or should be changed, see BufferingMode for further details.
The Input
port is linked to (if available) the upstream
output or error output port specified by the factory.
Get the factory from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>).
Namespace: actionETL
Assembly: actionETL.dll
Syntax
public static class RowActionTargetFactory
Methods
RowActionTarget<TInput>(in DownstreamFactory<TInput>, String, Action<TInput>)
Initializes a new instance of the RowActionTarget<TInput> dataflow worker, which executes a synchronous action on each incoming row.
The Input
port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static RowActionTarget<TInput> RowActionTarget<TInput>(this in DownstreamFactory<TInput> downstreamFactory, string workerName, Action<TInput> rowAction)
where TInput : class
Parameters
Type | Name | Description |
---|---|---|
DownstreamFactory<TInput> | downstreamFactory | The downstream factory, which specifies the parent worker and (optionally) the upstream port to link the "first" input port of this dataflow worker to. Get it from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>). |
String | workerName | Name of the worker.
Set to a prefix plus a trailing
While less useful, set to
The name cannot otherwise contain |
Action<TInput> | rowAction | The synchronous action that will get called for each incoming row.
It receives the row as a parameter, which is guaranteed to not be |
Returns
Type | Description |
---|---|
RowActionTarget<TInput> | The newly created and (optionally) linked worker. |
Type Parameters
Name | Description |
---|---|
TInput | The type of the input rows. |
Exceptions
Type | Condition |
---|---|
ArgumentException |
|
ArgumentNullException |
|
InvalidOperationException |
|
RowActionTarget<TInput>(in DownstreamFactory<TInput>, String, Func<TInput, ProgressStatus>)
Initializes a new instance of the RowActionTarget<TInput> dataflow worker, which executes a synchronous function on each incoming row.
The Input
port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static RowActionTarget<TInput> RowActionTarget<TInput>(this in DownstreamFactory<TInput> downstreamFactory, string workerName, Func<TInput, ProgressStatus> rowFunc)
where TInput : class
Parameters
Type | Name | Description |
---|---|---|
DownstreamFactory<TInput> | downstreamFactory | The downstream factory, which specifies the parent worker and (optionally) the upstream port to link the "first" input port of this dataflow worker to. Get it from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>). |
String | workerName | Name of the worker.
Set to a prefix plus a trailing
While less useful, set to
The name cannot otherwise contain |
Func<TInput, ProgressStatus> | rowFunc | The synchronous function that will get called for each incoming row.
It receives the row as a parameter, which is guaranteed to not be
|
Returns
Type | Description |
---|---|
RowActionTarget<TInput> | The newly created and (optionally) linked worker. |
Type Parameters
Name | Description |
---|---|
TInput | The type of the input rows. |
Exceptions
Type | Condition |
---|---|
ArgumentException |
|
ArgumentNullException |
|
InvalidOperationException |
|
RowActionTarget<TInput>(in DownstreamFactory<TInput>, String, Func<RowActionTarget<TInput>, Task<ProgressStatus>>, Action<TInput>, Func<RowActionTarget<TInput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>>)
Initializes a new instance of the RowActionTarget<TInput> dataflow worker, which executes a synchronous action on each incoming row.
The Input
port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static RowActionTarget<TInput> RowActionTarget<TInput>(this in DownstreamFactory<TInput> downstreamFactory, string workerName, Func<RowActionTarget<TInput>, Task<ProgressStatus>> startingFuncAsync, Action<TInput> rowAction, Func<RowActionTarget<TInput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> ranFuncAsync)
where TInput : class
Parameters
Type | Name | Description |
---|---|---|
DownstreamFactory<TInput> | downstreamFactory | The downstream factory, which specifies the parent worker and (optionally) the upstream port to link the "first" input port of this dataflow worker to. Get it from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>). |
String | workerName | Name of the worker.
Set to a prefix plus a trailing
While less useful, set to
The name cannot otherwise contain |
Func<RowActionTarget<TInput>, Task<ProgressStatus>> | startingFuncAsync | A function that will be called before the row processing starts, ignored if
|
Action<TInput> | rowAction | The synchronous action that will get called for each incoming row.
It receives the row as a parameter, which is guaranteed to not be |
Func<RowActionTarget<TInput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> | ranFuncAsync | A function that will be called after any
null to return the same OutcomeStatus that was passed in.
|
Returns
Type | Description |
---|---|
RowActionTarget<TInput> | The newly created and (optionally) linked worker. |
Type Parameters
Name | Description |
---|---|
TInput | The type of the input rows. |
Exceptions
Type | Condition |
---|---|
ArgumentException |
|
ArgumentNullException |
|
InvalidOperationException |
|
RowActionTarget<TInput>(in DownstreamFactory<TInput>, String, Func<RowActionTarget<TInput>, Task<ProgressStatus>>, Func<TInput, ProgressStatus>, Func<RowActionTarget<TInput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>>)
Initializes a new instance of the RowActionTarget<TInput> dataflow worker, which executes a synchronous function on each incoming row.
The Input
port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static RowActionTarget<TInput> RowActionTarget<TInput>(this in DownstreamFactory<TInput> downstreamFactory, string workerName, Func<RowActionTarget<TInput>, Task<ProgressStatus>> startingFuncAsync, Func<TInput, ProgressStatus> rowFunc, Func<RowActionTarget<TInput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> ranFuncAsync)
where TInput : class
Parameters
Type | Name | Description |
---|---|---|
DownstreamFactory<TInput> | downstreamFactory | The downstream factory, which specifies the parent worker and (optionally) the upstream port to link the "first" input port of this dataflow worker to. Get it from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>). |
String | workerName | Name of the worker.
Set to a prefix plus a trailing
While less useful, set to
The name cannot otherwise contain |
Func<RowActionTarget<TInput>, Task<ProgressStatus>> | startingFuncAsync | A function that will be called before the row processing starts, ignored if
|
Func<TInput, ProgressStatus> | rowFunc | The synchronous function that will get called for each incoming row.
It receives the row as a parameter, which is guaranteed to not be
|
Func<RowActionTarget<TInput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> | ranFuncAsync | A function that will be called after any
null to return the same OutcomeStatus that was passed in.
|
Returns
Type | Description |
---|---|
RowActionTarget<TInput> | The newly created and (optionally) linked worker. |
Type Parameters
Name | Description |
---|---|
TInput | The type of the input rows. |
Exceptions
Type | Condition |
---|---|
ArgumentException |
|
ArgumentNullException |
|
InvalidOperationException |
|