Search Results for

    Show / Hide Table of Contents

    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>).

    Inheritance
    Object
    RowsActionTransformFactory
    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 "/" (e.g. "MyPrefix-/") to generate a unique name from the prefix plus an increasing number starting at 1.

    While less useful, set to null, whitespace or "/" to generate a unique name from the worker type plus an increasing number starting at 1.

    The name cannot otherwise contain "/", and cannot start with double underscore "__".

    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 Input port to consume incoming rows, and calls methods on the Output and ErrorOutput ports to pass data to the downstream workers, until it has exhausted either the current incoming rows or the current output demand.

    Returns
    Type Description
    RowsActionTransform<TInputOutputError>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInputOutputError

    The type of each Input, Output and ErrorOutput row.

    Exceptions
    Type Condition
    ArgumentNullException

    rowsAndDemandAction

    ArgumentException

    workerName:

    • Workers with the same parent must have unique names.
    • Worker and worker system names cannot contain '/' or start with double underscore '__'.
    ArgumentNullException

    workerParent - All workers must have a parent. The top level workers have the worker system as parent.

    InvalidOperationException
    • Cannot add child worker to parent which has completed. Are you adding it to the correct parent?
    • Cannot add worker to parent, since its children have been started. Are you adding it to the correct parent?

    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 "/" (e.g. "MyPrefix-/") to generate a unique name from the prefix plus an increasing number starting at 1.

    While less useful, set to null, whitespace or "/" to generate a unique name from the worker type plus an increasing number starting at 1.

    The name cannot otherwise contain "/", and cannot start with double underscore "__".

    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 Input port to consume incoming rows, and calls methods on the Output and ErrorOutput ports to pass data to the downstream workers, until it has exhausted either the current incoming rows or the current output demand. It receives the worker as a parameter, and should return:

    • NotCompleted to continue row processing.
    • Succeeded to skip further row processing by emptying the Input port.
    • Error or Fatal to fail the worker and any incomplete ports, stopping further row processing.

    Returns
    Type Description
    RowsActionTransform<TInputOutputError>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInputOutputError

    The type of each Input, Output and ErrorOutput row.

    Exceptions
    Type Condition
    ArgumentNullException

    rowsAndDemandFunc

    ArgumentException

    workerName:

    • Workers with the same parent must have unique names.
    • Worker and worker system names cannot contain '/' or start with double underscore '__'.
    ArgumentNullException

    workerParent - All workers must have a parent. The top level workers have the worker system as parent.

    InvalidOperationException
    • Cannot add child worker to parent which has completed. Are you adding it to the correct parent?
    • Cannot add worker to parent, since its children have been started. Are you adding it to the correct parent?

    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 "/" (e.g. "MyPrefix-/") to generate a unique name from the prefix plus an increasing number starting at 1.

    While less useful, set to null, whitespace or "/" to generate a unique name from the worker type plus an increasing number starting at 1.

    The name cannot otherwise contain "/", and cannot start with double underscore "__".

    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 Input port to consume incoming rows, and calls methods on the Output and ErrorOutput ports to pass data to the downstream workers, until it has exhausted either the current incoming rows or the current output demand. It receives the worker as a parameter, and should return:

    • NotCompleted to continue row processing.
    • Succeeded to skip further row processing by emptying the Input port.
    • Error or Fatal to fail the worker and any incomplete ports, stopping further row processing.

    Returns
    Type Description
    RowsActionTransform<TInputOutputError>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInputOutputError

    The type of each Input, Output and ErrorOutput row.

    Exceptions
    Type Condition
    ArgumentNullException

    rowsAndDemandFuncAsync

    ArgumentException

    workerName:

    • Workers with the same parent must have unique names.
    • Worker and worker system names cannot contain '/' or start with double underscore '__'.
    ArgumentNullException

    workerParent - All workers must have a parent. The top level workers have the worker system as parent.

    InvalidOperationException
    • Cannot add child worker to parent which has completed. Are you adding it to the correct parent?
    • Cannot add worker to parent, since its children have been started. Are you adding it to the correct parent?

    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 startingFuncAsync function.
    • Repeatedly calls the rowsAndDemandFunc synchronous function when there is both data to consume from the upstream worker and RowsPerBuffer demand available from the downstream worker.
    • Calls the ranFuncAsync function.

    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 "/" (e.g. "MyPrefix-/") to generate a unique name from the prefix plus an increasing number starting at 1.

    While less useful, set to null, whitespace or "/" to generate a unique name from the worker type plus an increasing number starting at 1.

    The name cannot otherwise contain "/", and cannot start with double underscore "__".

    Func<RowsActionTransform<TInputOutputError>, Task<ProgressStatus>> startingFuncAsync

    A function that will be called before the row processing starts, ignored if null. It receives the worker as a parameter, and should return:

    • NotCompleted to perform normal row processing.
    • Succeeded to skip normal by row processing by discarding any input rows, and successfully complete any output ports.
    • Error or Fatal to fail the worker and any incomplete ports, stopping further row processing.

    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 Input port to consume incoming rows, and calls methods on the Output and ErrorOutput ports to pass data to the downstream workers, until it has exhausted either the current incoming rows or the current output demand. It receives the worker as a parameter, and should return:

    • NotCompleted to continue row processing.
    • Succeeded to skip further row processing by emptying the Input port.
    • Error or Fatal to fail the worker and any incomplete ports, stopping further row processing.

    Func<RowsActionTransform<TInputOutputError>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> ranFuncAsync

    A function that will be called after any startingFuncAsync and normal processing have completed. Receives the worker and the current OutcomeStatus as parameters. It should return:

    • Succeeded to complete the worker successfully. Note that if any ports have not been completed, or have failed, then the worker will still be failed.
    • Error or Fatal to fail the worker and any incomplete ports.
    Set to 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 Input, Output and ErrorOutput row.

    Exceptions
    Type Condition
    ArgumentNullException

    rowsAndDemandFunc

    ArgumentException

    workerName:

    • Workers with the same parent must have unique names.
    • Worker and worker system names cannot contain '/' or start with double underscore '__'.
    ArgumentNullException

    workerParent - All workers must have a parent. The top level workers have the worker system as parent.

    InvalidOperationException
    • Cannot add child worker to parent which has completed. Are you adding it to the correct parent?
    • Cannot add worker to parent, since its children have been started. Are you adding it to the correct parent?

    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 startingFuncAsync function.
    • Repeatedly calls the rowsAndDemandFuncAsync asynchronous function when there is both data to consume from the upstream worker and RowsPerBuffer demand available from the downstream worker.
    • Calls the ranFuncAsync function.

    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 "/" (e.g. "MyPrefix-/") to generate a unique name from the prefix plus an increasing number starting at 1.

    While less useful, set to null, whitespace or "/" to generate a unique name from the worker type plus an increasing number starting at 1.

    The name cannot otherwise contain "/", and cannot start with double underscore "__".

    Func<RowsActionTransform<TInputOutputError>, Task<ProgressStatus>> startingFuncAsync

    A function that will be called before the row processing starts, ignored if null. It receives the worker as a parameter, and should return:

    • NotCompleted to perform normal row processing.
    • Succeeded to skip normal by row processing by discarding any input rows, and successfully complete any output ports.
    • Error or Fatal to fail the worker and any incomplete ports, stopping further row processing.

    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 Input port to consume incoming rows, and calls methods on the Output and ErrorOutput ports to pass data to the downstream workers, until it has exhausted either the current incoming rows or the current output demand. It receives the worker as a parameter, and should return:

    • NotCompleted to continue row processing.
    • Succeeded to skip further row processing by emptying the Input port.
    • Error or Fatal to fail the worker and any incomplete ports, stopping further row processing.

    Func<RowsActionTransform<TInputOutputError>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> ranFuncAsync

    A function that will be called after any startingFuncAsync and normal processing have completed. Receives the worker and the current OutcomeStatus as parameters. It should return:

    • Succeeded to complete the worker successfully. Note that if any ports have not been completed, or have failed, then the worker will still be failed.
    • Error or Fatal to fail the worker and any incomplete ports.
    Set to 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 Input, Output and ErrorOutput row.

    Exceptions
    Type Condition
    ArgumentNullException

    rowsAndDemandFuncAsync

    ArgumentException

    workerName:

    • Workers with the same parent must have unique names.
    • Worker and worker system names cannot contain '/' or start with double underscore '__'.
    ArgumentNullException

    workerParent - All workers must have a parent. The top level workers have the worker system as parent.

    InvalidOperationException
    • Cannot add child worker to parent which has completed. Are you adding it to the correct parent?
    • Cannot add worker to parent, since its children have been started. Are you adding it to the correct parent?

    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 "/" (e.g. "MyPrefix-/") to generate a unique name from the prefix plus an increasing number starting at 1.

    While less useful, set to null, whitespace or "/" to generate a unique name from the worker type plus an increasing number starting at 1.

    The name cannot otherwise contain "/", and cannot start with double underscore "__".

    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 Input port to consume incoming rows, and calls methods on the Output and ErrorOutput ports to pass data to the downstream workers, until it has exhausted either the current incoming rows or the current output demand.

    Returns
    Type Description
    RowsActionTransform<TInputOutputError>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInputOutputError

    The type of each Input, Output and ErrorOutput row.

    Exceptions
    Type Condition
    ArgumentNullException

    rowsAndDemandActionAsync

    ArgumentException

    workerName:

    • Workers with the same parent must have unique names.
    • Worker and worker system names cannot contain '/' or start with double underscore '__'.
    ArgumentNullException

    workerParent - All workers must have a parent. The top level workers have the worker system as parent.

    InvalidOperationException
    • Cannot add child worker to parent which has completed. Are you adding it to the correct parent?
    • Cannot add worker to parent, since its children have been started. Are you adding it to the correct parent?

    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 "/" (e.g. "MyPrefix-/") to generate a unique name from the prefix plus an increasing number starting at 1.

    While less useful, set to null, whitespace or "/" to generate a unique name from the worker type plus an increasing number starting at 1.

    The name cannot otherwise contain "/", and cannot start with double underscore "__".

    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 Input port to consume incoming rows, and calls methods on the Output and ErrorOutput ports to pass data to the downstream workers, until it has exhausted either the current incoming rows or the current output demand.

    Returns
    Type Description
    RowsActionTransform<TInputError, TOutput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInputError

    The type of each Input and ErrorOutput row.

    TOutput

    The type of each Output row.

    Exceptions
    Type Condition
    ArgumentNullException

    rowsAndDemandAction

    ArgumentException

    workerName:

    • Workers with the same parent must have unique names.
    • Worker and worker system names cannot contain '/' or start with double underscore '__'.
    ArgumentNullException

    workerParent - All workers must have a parent. The top level workers have the worker system as parent.

    InvalidOperationException
    • Cannot add child worker to parent which has completed. Are you adding it to the correct parent?
    • Cannot add worker to parent, since its children have been started. Are you adding it to the correct parent?

    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 "/" (e.g. "MyPrefix-/") to generate a unique name from the prefix plus an increasing number starting at 1.

    While less useful, set to null, whitespace or "/" to generate a unique name from the worker type plus an increasing number starting at 1.

    The name cannot otherwise contain "/", and cannot start with double underscore "__".

    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 Input port to consume incoming rows, and calls methods on the Output and ErrorOutput ports to pass data to the downstream workers, until it has exhausted either the current incoming rows or the current output demand. It receives the worker as a parameter, and should return:

    • NotCompleted to continue row processing.
    • Succeeded to skip further row processing by emptying the Input port.
    • Error or Fatal to fail the worker and any incomplete ports, stopping further row processing.

    Returns
    Type Description
    RowsActionTransform<TInputError, TOutput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInputError

    The type of each Input and ErrorOutput row.

    TOutput

    The type of each Output row.

    Exceptions
    Type Condition
    ArgumentNullException

    rowsAndDemandFunc

    ArgumentException

    workerName:

    • Workers with the same parent must have unique names.
    • Worker and worker system names cannot contain '/' or start with double underscore '__'.
    ArgumentNullException

    workerParent - All workers must have a parent. The top level workers have the worker system as parent.

    InvalidOperationException
    • Cannot add child worker to parent which has completed. Are you adding it to the correct parent?
    • Cannot add worker to parent, since its children have been started. Are you adding it to the correct parent?

    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 "/" (e.g. "MyPrefix-/") to generate a unique name from the prefix plus an increasing number starting at 1.

    While less useful, set to null, whitespace or "/" to generate a unique name from the worker type plus an increasing number starting at 1.

    The name cannot otherwise contain "/", and cannot start with double underscore "__".

    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 Input port to consume incoming rows, and calls methods on the Output and ErrorOutput ports to pass data to the downstream workers, until it has exhausted either the current incoming rows or the current output demand. It receives the worker as a parameter, and should return:

    • NotCompleted to continue row processing.
    • Succeeded to skip further row processing by emptying the Input port.
    • Error or Fatal to fail the worker and any incomplete ports, stopping further row processing.

    Returns
    Type Description
    RowsActionTransform<TInputError, TOutput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInputError

    The type of each Input and ErrorOutput row.

    TOutput

    The type of each Output row.

    Exceptions
    Type Condition
    ArgumentNullException

    rowsAndDemandFuncAsync

    ArgumentException

    workerName:

    • Workers with the same parent must have unique names.
    • Worker and worker system names cannot contain '/' or start with double underscore '__'.
    ArgumentNullException

    workerParent - All workers must have a parent. The top level workers have the worker system as parent.

    InvalidOperationException
    • Cannot add child worker to parent which has completed. Are you adding it to the correct parent?
    • Cannot add worker to parent, since its children have been started. Are you adding it to the correct parent?

    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 startingFuncAsync function.
    • Repeatedly calls the rowsAndDemandFunc synchronous function when there is both data to consume from the upstream worker and RowsPerBuffer demand available from the downstream worker.
    • Calls the ranFuncAsync function.

    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 "/" (e.g. "MyPrefix-/") to generate a unique name from the prefix plus an increasing number starting at 1.

    While less useful, set to null, whitespace or "/" to generate a unique name from the worker type plus an increasing number starting at 1.

    The name cannot otherwise contain "/", and cannot start with double underscore "__".

    Func<RowsActionTransform<TInputError, TOutput>, Task<ProgressStatus>> startingFuncAsync

    A function that will be called before the row processing starts, ignored if null. It receives the worker as a parameter, and should return:

    • NotCompleted to perform normal row processing.
    • Succeeded to skip normal by row processing by discarding any input rows, and successfully complete any output ports.
    • Error or Fatal to fail the worker and any incomplete ports, stopping further row processing.

    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 Input port to consume incoming rows, and calls methods on the Output and ErrorOutput ports to pass data to the downstream workers, until it has exhausted either the current incoming rows or the current output demand. It receives the worker as a parameter, and should return:

    • NotCompleted to continue row processing.
    • Succeeded to skip further row processing by emptying the Input port.
    • Error or Fatal to fail the worker and any incomplete ports, stopping further row processing.

    Func<RowsActionTransform<TInputError, TOutput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> ranFuncAsync

    A function that will be called after any startingFuncAsync and normal processing have completed. Receives the worker and the current OutcomeStatus as parameters. It should return:

    • Succeeded to complete the worker successfully. Note that if any ports have not been completed, or have failed, then the worker will still be failed.
    • Error or Fatal to fail the worker and any incomplete ports.
    Set to 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 Input and ErrorOutput row.

    TOutput

    The type of each Output row.

    Exceptions
    Type Condition
    ArgumentNullException

    rowsAndDemandFunc

    ArgumentException

    workerName:

    • Workers with the same parent must have unique names.
    • Worker and worker system names cannot contain '/' or start with double underscore '__'.
    ArgumentNullException

    workerParent - All workers must have a parent. The top level workers have the worker system as parent.

    InvalidOperationException
    • Cannot add child worker to parent which has completed. Are you adding it to the correct parent?
    • Cannot add worker to parent, since its children have been started. Are you adding it to the correct parent?

    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 startingFuncAsync function.
    • Repeatedly calls the rowsAndDemandFuncAsync asynchronous function when there is both data to consume from the upstream worker and RowsPerBuffer demand available from the downstream worker.
    • Calls the ranFuncAsync function.

    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 "/" (e.g. "MyPrefix-/") to generate a unique name from the prefix plus an increasing number starting at 1.

    While less useful, set to null, whitespace or "/" to generate a unique name from the worker type plus an increasing number starting at 1.

    The name cannot otherwise contain "/", and cannot start with double underscore "__".

    Func<RowsActionTransform<TInputError, TOutput>, Task<ProgressStatus>> startingFuncAsync

    A function that will be called before the row processing starts, ignored if null. It receives the worker as a parameter, and should return:

    • NotCompleted to perform normal row processing.
    • Succeeded to skip normal by row processing by discarding any input rows, and successfully complete any output ports.
    • Error or Fatal to fail the worker and any incomplete ports, stopping further row processing.

    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 Input port to consume incoming rows, and calls methods on the Output and ErrorOutput ports to pass data to the downstream workers, until it has exhausted either the current incoming rows or the current output demand. It receives the worker as a parameter, and should return:

    • NotCompleted to continue row processing.
    • Succeeded to skip further row processing by emptying the Input port.
    • Error or Fatal to fail the worker and any incomplete ports, stopping further row processing.

    Func<RowsActionTransform<TInputError, TOutput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>> ranFuncAsync

    A function that will be called after any startingFuncAsync and normal processing have completed. Receives the worker and the current OutcomeStatus as parameters. It should return:

    • Succeeded to complete the worker successfully. Note that if any ports have not been completed, or have failed, then the worker will still be failed.
    • Error or Fatal to fail the worker and any incomplete ports.
    Set to 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 Input and ErrorOutput row.

    TOutput

    The type of each Output row.

    Exceptions
    Type Condition
    ArgumentNullException

    rowsAndDemandFuncAsync

    ArgumentException

    workerName:

    • Workers with the same parent must have unique names.
    • Worker and worker system names cannot contain '/' or start with double underscore '__'.
    ArgumentNullException

    workerParent - All workers must have a parent. The top level workers have the worker system as parent.

    InvalidOperationException
    • Cannot add child worker to parent which has completed. Are you adding it to the correct parent?
    • Cannot add worker to parent, since its children have been started. Are you adding it to the correct parent?

    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 "/" (e.g. "MyPrefix-/") to generate a unique name from the prefix plus an increasing number starting at 1.

    While less useful, set to null, whitespace or "/" to generate a unique name from the worker type plus an increasing number starting at 1.

    The name cannot otherwise contain "/", and cannot start with double underscore "__".

    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 Input port to consume incoming rows, and calls methods on the Output and ErrorOutput ports to pass data to the downstream workers, until it has exhausted either the current incoming rows or the current output demand.

    Returns
    Type Description
    RowsActionTransform<TInputError, TOutput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInputError

    The type of each Input and ErrorOutput row.

    TOutput

    The type of each Output row.

    Exceptions
    Type Condition
    ArgumentNullException

    rowsAndDemandActionAsync

    ArgumentException

    workerName:

    • Workers with the same parent must have unique names.
    • Worker and worker system names cannot contain '/' or start with double underscore '__'.
    ArgumentNullException

    workerParent - All workers must have a parent. The top level workers have the worker system as parent.

    InvalidOperationException
    • Cannot add child worker to parent which has completed. Are you adding it to the correct parent?
    • Cannot add worker to parent, since its children have been started. Are you adding it to the correct parent?

    See Also

    RowsActionTransform<TInputOutputError>
    RowsActionTransform<TInputError, TOutput>
    In This Article
    Back to top Copyright © 2023 Envobi Ltd