Class RowsActionTransformFactory
Factory methods that create a RowsActionTransform<TInputOutputError> or RowsActionTransform<TInputError, TOutput> dataflow worker, which repeatedly executes a callback when there is both rows available from the upstream worker and RowsPerBuffer demand available from the downstream worker.
These class allows the developer to write synchronous or asynchronous code as needed,
without having to check for output demand (which simplifies the implementation), as long as
no more than RowsPerBuffer rows are sent on each invocation (unless demand is
checked for explicitly, e.g. via TrySend* methods).
The input port uses the Default policy. Consider whether this is appropriate, or should be overridden, see BufferingMode for further details.
Also see the RowsActionTransform example.
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 RowsActionTransformFactory
Methods
RowsActionTransform1<TInputOutputError>(in DownstreamFactory<TInputOutputError>, String, Action<RowsActionTransform<TInputOutputError>>)
Initializes a new instance of the
RowsActionTransform<TInputOutputError>
dataflow worker, which repeatedly executes a synchronous action when there is both rows available
from the upstream worker and RowsPerBuffer
demand available from the downstream worker. The Output will be automatically
completed, if needed.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static RowsActionTransform<TInputOutputError> RowsActionTransform1<TInputOutputError>(this in DownstreamFactory<TInputOutputError> downstreamFactory, string workerName, Action<RowsActionTransform<TInputOutputError>> rowsAndDemandAction)
where TInputOutputError : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputOutputError> | 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<RowsActionTransform<TInputOutputError>> | rowsAndDemandAction | A synchronous action that is called when there is both data to consume from
the upstream worker and RowsPerBuffer demand available from
the downstream worker. The action receives the worker as a parameter, and calls
methods on the |
Returns
| Type | Description |
|---|---|
| RowsActionTransform<TInputOutputError> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputOutputError | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
RowsActionTransform1<TInputOutputError>(in DownstreamFactory<TInputOutputError>, String, Func<RowsActionTransform<TInputOutputError>, ProgressStatus>)
Initializes a new instance of the
RowsActionTransform<TInputOutputError>
dataflow worker, which repeatedly executes a synchronous function when there is both rows available
from the upstream worker and RowsPerBuffer
demand available from the downstream worker. The Output will be automatically
completed, if needed.
The Output will be automatically completed, if needed.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static RowsActionTransform<TInputOutputError> RowsActionTransform1<TInputOutputError>(this in DownstreamFactory<TInputOutputError> downstreamFactory, string workerName, Func<RowsActionTransform<TInputOutputError>, ProgressStatus> rowsAndDemandFunc)
where TInputOutputError : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputOutputError> | 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<RowsActionTransform<TInputOutputError>, ProgressStatus> | rowsAndDemandFunc | A synchronous function that is called repeatedly when there is both data
to consume from the upstream worker and RowsPerBuffer demand
available from the downstream worker. The function in turn calls methods on the
|
Returns
| Type | Description |
|---|---|
| RowsActionTransform<TInputOutputError> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputOutputError | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
RowsActionTransform1<TInputOutputError>(in DownstreamFactory<TInputOutputError>, String, Func<RowsActionTransform<TInputOutputError>, Task<ProgressStatus>>)
Initializes a new instance of the
RowsActionTransform<TInputOutputError>
dataflow worker, which repeatedly executes an asynchronous function when there is both rows available
from the upstream worker and RowsPerBuffer
demand available from the downstream worker.
The Output will be automatically completed, if needed.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static RowsActionTransform<TInputOutputError> RowsActionTransform1<TInputOutputError>(this in DownstreamFactory<TInputOutputError> downstreamFactory, string workerName, Func<RowsActionTransform<TInputOutputError>, Task<ProgressStatus>> rowsAndDemandFuncAsync)
where TInputOutputError : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputOutputError> | 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<RowsActionTransform<TInputOutputError>, Task<ProgressStatus>> | rowsAndDemandFuncAsync | An asynchronous function that is called repeatedly when there is both data
to consume from the upstream worker and RowsPerBuffer
demand available from the downstream worker.
The function in turn calls methods on the
|
Returns
| Type | Description |
|---|---|
| RowsActionTransform<TInputOutputError> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputOutputError | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
RowsActionTransform1<TInputOutputError>(in DownstreamFactory<TInputOutputError>, String, Func<RowsActionTransform<TInputOutputError>, Task<ProgressStatus>>, Func<RowsActionTransform<TInputOutputError>, ProgressStatus>, Func<RowsActionTransform<TInputOutputError>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>>)
Initializes a new instance of the RowsActionTransform<TInputOutputError> dataflow worker, which repeatedly executes a synchronous function when there is both rows available from the upstream worker and RowsPerBuffer demand available from the downstream worker.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
When the worker runs, it:
- Calls the
startingFuncAsyncfunction. - Repeatedly calls the
rowsAndDemandFuncsynchronous function when there is both data to consume from the upstream worker and RowsPerBuffer demand available from the downstream worker. - Calls the
ranFuncAsyncfunction.
Declaration
public static RowsActionTransform<TInputOutputError> RowsActionTransform1<TInputOutputError>(this in DownstreamFactory<TInputOutputError> downstreamFactory, string workerName, Func<RowsActionTransform<TInputOutputError>, Task<ProgressStatus>> startingFuncAsync, Func<RowsActionTransform<TInputOutputError>, ProgressStatus> rowsAndDemandFunc, Func<RowsActionTransform<TInputOutputError>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> ranFuncAsync)
where TInputOutputError : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputOutputError> | 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<RowsActionTransform<TInputOutputError>, Task<ProgressStatus>> | startingFuncAsync | A function that will be called before the row processing starts, ignored if
|
| Func<RowsActionTransform<TInputOutputError>, ProgressStatus> | rowsAndDemandFunc | A synchronous function that is called repeatedly when there is both data
to consume from the upstream worker and RowsPerBuffer demand
available from the downstream worker. The function in turn calls methods on the
|
| Func<RowsActionTransform<TInputOutputError>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> | ranFuncAsync | A function that will be called after any
null to return the same OutcomeStatus that was passed in, after
(if needed) completing the Output port according to the OutcomeStatus.
|
Returns
| Type | Description |
|---|---|
| RowsActionTransform<TInputOutputError> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputOutputError | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
RowsActionTransform1<TInputOutputError>(in DownstreamFactory<TInputOutputError>, String, Func<RowsActionTransform<TInputOutputError>, Task<ProgressStatus>>, Func<RowsActionTransform<TInputOutputError>, Task<ProgressStatus>>, Func<RowsActionTransform<TInputOutputError>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>>)
Initializes a new instance of the RowsActionTransform<TInputOutputError> dataflow worker, which repeatedly executes an asynchronous function when there is both rows available from the upstream worker and RowsPerBuffer demand available from the downstream worker.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
When the worker runs, it:
- Calls the
startingFuncAsyncfunction. - Repeatedly calls the
rowsAndDemandFuncAsyncasynchronous function when there is both data to consume from the upstream worker and RowsPerBuffer demand available from the downstream worker. - Calls the
ranFuncAsyncfunction.
Declaration
public static RowsActionTransform<TInputOutputError> RowsActionTransform1<TInputOutputError>(this in DownstreamFactory<TInputOutputError> downstreamFactory, string workerName, Func<RowsActionTransform<TInputOutputError>, Task<ProgressStatus>> startingFuncAsync, Func<RowsActionTransform<TInputOutputError>, Task<ProgressStatus>> rowsAndDemandFuncAsync, Func<RowsActionTransform<TInputOutputError>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> ranFuncAsync)
where TInputOutputError : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputOutputError> | 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<RowsActionTransform<TInputOutputError>, Task<ProgressStatus>> | startingFuncAsync | A function that will be called before the row processing starts, ignored if
|
| Func<RowsActionTransform<TInputOutputError>, Task<ProgressStatus>> | rowsAndDemandFuncAsync | An asynchronous function that is called repeatedly when there is both data
to consume from the upstream worker and RowsPerBuffer
demand available from the downstream worker.
The function in turn calls methods on the
|
| Func<RowsActionTransform<TInputOutputError>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> | ranFuncAsync | A function that will be called after any
null to return the same OutcomeStatus that was passed in, after
(if needed) completing the Output port according to the OutcomeStatus.
|
Returns
| Type | Description |
|---|---|
| RowsActionTransform<TInputOutputError> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputOutputError | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
RowsActionTransform1<TInputOutputError>(in DownstreamFactory<TInputOutputError>, String, Func<RowsActionTransform<TInputOutputError>, Task>)
Initializes a new instance of the
RowsActionTransform<TInputOutputError>
dataflow worker, which repeatedly executes an asynchronous action when there is both rows available
from the upstream worker and RowsPerBuffer
demand available from the downstream worker.
The Output will be automatically completed, if needed.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static RowsActionTransform<TInputOutputError> RowsActionTransform1<TInputOutputError>(this in DownstreamFactory<TInputOutputError> downstreamFactory, string workerName, Func<RowsActionTransform<TInputOutputError>, Task> rowsAndDemandActionAsync)
where TInputOutputError : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputOutputError> | 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<RowsActionTransform<TInputOutputError>, Task> | rowsAndDemandActionAsync | An asynchronous action that is called when
there is both data to consume from the upstream worker and
RowsPerBuffer demand available from the
downstream worker. The action receives the worker as a parameter, and calls methods on
the |
Returns
| Type | Description |
|---|---|
| RowsActionTransform<TInputOutputError> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputOutputError | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
RowsActionTransform2<TInputError, TOutput>(in DownstreamFactory<TInputError>, String, Action<RowsActionTransform<TInputError, TOutput>>)
Initializes a new instance of the
RowsActionTransform<TInputError, TOutput>
dataflow worker, which repeatedly executes a synchronous action when there is both rows available
from the upstream worker and RowsPerBuffer
demand available from the downstream worker. The Output will be automatically
completed, if needed.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static RowsActionTransform<TInputError, TOutput> RowsActionTransform2<TInputError, TOutput>(this in DownstreamFactory<TInputError> downstreamFactory, string workerName, Action<RowsActionTransform<TInputError, TOutput>> rowsAndDemandAction)
where TInputError : class where TOutput : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputError> | 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<RowsActionTransform<TInputError, TOutput>> | rowsAndDemandAction | A synchronous action that is called when there is both data to consume from
the upstream worker and RowsPerBuffer demand available from
the downstream worker. The action receives the worker as a parameter, and calls
methods on the |
Returns
| Type | Description |
|---|---|
| RowsActionTransform<TInputError, TOutput> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputError | The type of each |
| TOutput | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
RowsActionTransform2<TInputError, TOutput>(in DownstreamFactory<TInputError>, String, Func<RowsActionTransform<TInputError, TOutput>, ProgressStatus>)
Initializes a new instance of the
RowsActionTransform<TInputError, TOutput>
dataflow worker, which repeatedly executes a synchronous function when there is both rows available
from the upstream worker and RowsPerBuffer
demand available from the downstream worker.
The Output will be automatically completed, if needed.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static RowsActionTransform<TInputError, TOutput> RowsActionTransform2<TInputError, TOutput>(this in DownstreamFactory<TInputError> downstreamFactory, string workerName, Func<RowsActionTransform<TInputError, TOutput>, ProgressStatus> rowsAndDemandFunc)
where TInputError : class where TOutput : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputError> | 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<RowsActionTransform<TInputError, TOutput>, ProgressStatus> | rowsAndDemandFunc | A synchronous function that is called repeatedly when there is both data
to consume from the upstream worker and RowsPerBuffer demand
available from the downstream worker. The function in turn calls methods on the
|
Returns
| Type | Description |
|---|---|
| RowsActionTransform<TInputError, TOutput> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputError | The type of each |
| TOutput | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
RowsActionTransform2<TInputError, TOutput>(in DownstreamFactory<TInputError>, String, Func<RowsActionTransform<TInputError, TOutput>, Task<ProgressStatus>>)
Initializes a new instance of the
RowsActionTransform<TInputError, TOutput>
dataflow worker, which repeatedly executes an asynchronous function when there is both rows available
from the upstream worker and RowsPerBuffer
demand available from the downstream worker.
The Output will be automatically completed, if needed.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static RowsActionTransform<TInputError, TOutput> RowsActionTransform2<TInputError, TOutput>(this in DownstreamFactory<TInputError> downstreamFactory, string workerName, Func<RowsActionTransform<TInputError, TOutput>, Task<ProgressStatus>> rowsAndDemandFuncAsync)
where TInputError : class where TOutput : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputError> | 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<RowsActionTransform<TInputError, TOutput>, Task<ProgressStatus>> | rowsAndDemandFuncAsync | An asynchronous function that is called repeatedly when there is both data
to consume from the upstream worker and RowsPerBuffer
demand available from the downstream worker.
The function in turn calls methods on the
|
Returns
| Type | Description |
|---|---|
| RowsActionTransform<TInputError, TOutput> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputError | The type of each |
| TOutput | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
RowsActionTransform2<TInputError, TOutput>(in DownstreamFactory<TInputError>, String, Func<RowsActionTransform<TInputError, TOutput>, Task<ProgressStatus>>, Func<RowsActionTransform<TInputError, TOutput>, ProgressStatus>, Func<RowsActionTransform<TInputError, TOutput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>>)
Initializes a new instance of the RowsActionTransform<TInputError, TOutput> dataflow worker, which repeatedly executes a synchronous function when there is both rows available from the upstream worker and RowsPerBuffer demand available from the downstream worker.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
When the worker runs, it:
- Calls the
startingFuncAsyncfunction. - Repeatedly calls the
rowsAndDemandFuncsynchronous function when there is both data to consume from the upstream worker and RowsPerBuffer demand available from the downstream worker. - Calls the
ranFuncAsyncfunction.
Declaration
public static RowsActionTransform<TInputError, TOutput> RowsActionTransform2<TInputError, TOutput>(this in DownstreamFactory<TInputError> downstreamFactory, string workerName, Func<RowsActionTransform<TInputError, TOutput>, Task<ProgressStatus>> startingFuncAsync, Func<RowsActionTransform<TInputError, TOutput>, ProgressStatus> rowsAndDemandFunc, Func<RowsActionTransform<TInputError, TOutput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> ranFuncAsync)
where TInputError : class where TOutput : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputError> | 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<RowsActionTransform<TInputError, TOutput>, Task<ProgressStatus>> | startingFuncAsync | A function that will be called before the row processing starts, ignored if
|
| Func<RowsActionTransform<TInputError, TOutput>, ProgressStatus> | rowsAndDemandFunc | A synchronous function that is called repeatedly when there is both data
to consume from the upstream worker and RowsPerBuffer demand
available from the downstream worker. The function in turn calls methods on the
|
| Func<RowsActionTransform<TInputError, TOutput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> | ranFuncAsync | A function that will be called after any
null to return the same OutcomeStatus that was passed in, after
(if needed) completing the Output port according to the OutcomeStatus.
|
Returns
| Type | Description |
|---|---|
| RowsActionTransform<TInputError, TOutput> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputError | The type of each |
| TOutput | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
RowsActionTransform2<TInputError, TOutput>(in DownstreamFactory<TInputError>, String, Func<RowsActionTransform<TInputError, TOutput>, Task<ProgressStatus>>, Func<RowsActionTransform<TInputError, TOutput>, Task<ProgressStatus>>, Func<RowsActionTransform<TInputError, TOutput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>>)
Initializes a new instance of the RowsActionTransform<TInputError, TOutput> dataflow worker, which repeatedly executes an asynchronous function when there is both rows available from the upstream worker and RowsPerBuffer demand available from the downstream worker.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
When the worker runs, it:
- Calls the
startingFuncAsyncfunction. - Repeatedly calls the
rowsAndDemandFuncAsyncasynchronous function when there is both data to consume from the upstream worker and RowsPerBuffer demand available from the downstream worker. - Calls the
ranFuncAsyncfunction.
Declaration
public static RowsActionTransform<TInputError, TOutput> RowsActionTransform2<TInputError, TOutput>(this in DownstreamFactory<TInputError> downstreamFactory, string workerName, Func<RowsActionTransform<TInputError, TOutput>, Task<ProgressStatus>> startingFuncAsync, Func<RowsActionTransform<TInputError, TOutput>, Task<ProgressStatus>> rowsAndDemandFuncAsync, Func<RowsActionTransform<TInputError, TOutput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> ranFuncAsync)
where TInputError : class where TOutput : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputError> | 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<RowsActionTransform<TInputError, TOutput>, Task<ProgressStatus>> | startingFuncAsync | A function that will be called before the row processing starts, ignored if
|
| Func<RowsActionTransform<TInputError, TOutput>, Task<ProgressStatus>> | rowsAndDemandFuncAsync | An asynchronous function that is called repeatedly when there is both data
to consume from the upstream worker and RowsPerBuffer
demand available from the downstream worker.
The function in turn calls methods on the
|
| Func<RowsActionTransform<TInputError, TOutput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> | ranFuncAsync | A function that will be called after any
null to return the same OutcomeStatus that was passed in, after
(if needed) completing the Output port according to the OutcomeStatus.
|
Returns
| Type | Description |
|---|---|
| RowsActionTransform<TInputError, TOutput> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputError | The type of each |
| TOutput | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
RowsActionTransform2<TInputError, TOutput>(in DownstreamFactory<TInputError>, String, Func<RowsActionTransform<TInputError, TOutput>, Task>)
Initializes a new instance of the
RowsActionTransform<TInputError, TOutput>
dataflow worker, which repeatedly executes an asynchronous action when there is both rows available
from the upstream worker and RowsPerBuffer
demand available from the downstream worker.
The Output will be automatically completed, if needed.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static RowsActionTransform<TInputError, TOutput> RowsActionTransform2<TInputError, TOutput>(this in DownstreamFactory<TInputError> downstreamFactory, string workerName, Func<RowsActionTransform<TInputError, TOutput>, Task> rowsAndDemandActionAsync)
where TInputError : class where TOutput : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputError> | 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<RowsActionTransform<TInputError, TOutput>, Task> | rowsAndDemandActionAsync | An asynchronous action that is called when
there is both data to consume from the upstream worker and
RowsPerBuffer demand available from the
downstream worker. The action receives the worker as a parameter, and calls methods on
the |
Returns
| Type | Description |
|---|---|
| RowsActionTransform<TInputError, TOutput> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputError | The type of each |
| TOutput | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|