Class RowsActionTransform<TInputOutputError>
A dataflow worker which repeatedly executes a callback when there is both rows available from the upstream worker and BufferCapacity demand available from the downstream worker. Input, output and error rows all have the same type (use RowsActionTransform<TInputError, TOutput> if they have different types).
Note: Use the factory methods in RowsActionTransformFactory to create instances of this class.
This 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 BufferCapacity
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.
Inheritance
Implements
Inherited Members
Namespace: actionETL
Assembly: actionETL.dll
Syntax
public class RowsActionTransform<TInputOutputError> : WorkerBase<RowsActionTransform<TInputOutputError>>, IDisposeOnFinished where TInputOutputError : class
Type Parameters
Name | Description |
---|---|
TInputOutputError | The type of each |
Properties
ErrorOutput
Gets the error output port for sending error rows to logging and an optional downstream worker.
Declaration
public ErrorOutputPort<TInputOutputError> ErrorOutput { get; }
Property Value
Type | Description |
---|---|
ErrorOutputPort<TInputOutputError> |
Input
Gets the input port for receiving rows from an upstream worker.
Declaration
public InputPort<TInputOutputError> Input { get; }
Property Value
Type | Description |
---|---|
InputPort<TInputOutputError> |
Output
Gets the output port for sending rows to the downstream worker.
Declaration
public OutputPort<TInputOutputError> Output { get; }
Property Value
Type | Description |
---|---|
OutputPort<TInputOutputError> |
Methods
RunAsync()
This method can be overridden to add custom functionality to the derived worker that runs before
and after the row processing, but after
AddStartingCallback(Func<WorkerBase, Task<ProgressStatus>>) and before
AddRanCallback(Func<WorkerBase, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>>).
In this case, the base class base.RunAsync()
must be called for the worker to function correctly.
Typically, this worker is used without overriding this method.
Declaration
protected override Task<OutcomeStatus> RunAsync()
Returns
Type | Description |
---|---|
Task<OutcomeStatus> | A |