Search Results for

    Show / Hide Table of Contents

    Class RowsActionTargetFactory

    Factory methods that create a RowsActionTarget<TInput> dataflow worker, which repeatedly executes a callback when there are rows to consume from the upstream worker.

    Also see the RowsActionTarget 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>).

    Inheritance
    Object
    RowsActionTargetFactory
    Namespace: actionETL
    Assembly: actionETL.dll
    Syntax
    public static class RowsActionTargetFactory

    Methods

    RowsActionTarget<TInput>(in DownstreamFactory<TInput>, String, Action<RowsActionTarget<TInput>>)

    Initializes a new instance of the RowsActionTarget<TInput> dataflow worker, which repeatedly executes a synchronous action when there are rows to consume from the upstream worker.

    The Input port is linked to (if available) the upstream output or error output port specified by the factory.

    Declaration
    public static RowsActionTarget<TInput> RowsActionTarget<TInput>(this in DownstreamFactory<TInput> downstreamFactory, string workerName, Action<RowsActionTarget<TInput>> inputRowsAction)
        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 "/" (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<RowsActionTarget<TInput>> inputRowsAction

    A synchronous action that is called when there are rows to consume from the upstream worker. The action receives the worker as a parameter, and calls methods on the Input port to consume incoming rows, until it has exhausted the currently available incoming rows.

    Returns
    Type Description
    RowsActionTarget<TInput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInput

    The type of the input rows.

    Exceptions
    Type Condition
    ArgumentNullException

    inputRowsAction

    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?

    RowsActionTarget<TInput>(in DownstreamFactory<TInput>, String, Func<RowsActionTarget<TInput>, ProgressStatus>)

    Initializes a new instance of the RowsActionTarget<TInput> dataflow worker, which repeatedly executes a synchronous function when there are rows to consume from the upstream worker.

    The Input port is linked to (if available) the upstream output or error output port specified by the factory.

    Declaration
    public static RowsActionTarget<TInput> RowsActionTarget<TInput>(this in DownstreamFactory<TInput> downstreamFactory, string workerName, Func<RowsActionTarget<TInput>, ProgressStatus> inputRowsFunc)
        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 "/" (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<RowsActionTarget<TInput>, ProgressStatus> inputRowsFunc

    A synchronous function that is called when there are rows to consume from the upstream worker. The function in turn calls methods on the Input port to consume incoming rows, until it has exhausted the currently available incoming rows. 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
    RowsActionTarget<TInput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInput

    The type of the input rows.

    Exceptions
    Type Condition
    ArgumentNullException

    inputRowsFunc

    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?

    RowsActionTarget<TInput>(in DownstreamFactory<TInput>, String, Func<RowsActionTarget<TInput>, Task<ProgressStatus>>)

    Initializes a new instance of the RowsActionTarget<TInput> dataflow worker, which repeatedly executes a asynchronous function when there are rows to consume from the upstream worker.

    The Input port is linked to (if available) the upstream output or error output port specified by the factory.

    Declaration
    public static RowsActionTarget<TInput> RowsActionTarget<TInput>(this in DownstreamFactory<TInput> downstreamFactory, string workerName, Func<RowsActionTarget<TInput>, Task<ProgressStatus>> inputRowsFuncAsync)
        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 "/" (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<RowsActionTarget<TInput>, Task<ProgressStatus>> inputRowsFuncAsync

    An asynchronous function that is called when there are rows to consume from the upstream worker. The function in turn calls methods on the Input port to consume incoming rows, until it has exhausted the currently available incoming rows. 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
    RowsActionTarget<TInput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInput

    The type of the input rows.

    Exceptions
    Type Condition
    ArgumentNullException

    inputRowsFuncAsync

    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?

    RowsActionTarget<TInput>(in DownstreamFactory<TInput>, String, Func<RowsActionTarget<TInput>, Task<ProgressStatus>>, Func<RowsActionTarget<TInput>, ProgressStatus>, Func<RowsActionTarget<TInput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>>)

    Initializes a new instance of the RowsActionTarget<TInput> dataflow worker, which repeatedly executes a synchronous function when there are rows to consume from the upstream worker.

    The Input port is linked to (if available) the upstream output or error output port specified by the factory.

    Declaration
    public static RowsActionTarget<TInput> RowsActionTarget<TInput>(this in DownstreamFactory<TInput> downstreamFactory, string workerName, Func<RowsActionTarget<TInput>, Task<ProgressStatus>> startingFuncAsync, Func<RowsActionTarget<TInput>, ProgressStatus> inputRowsFunc, Func<RowsActionTarget<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 "/" (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<RowsActionTarget<TInput>, 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<RowsActionTarget<TInput>, ProgressStatus> inputRowsFunc

    A synchronous function that is called when there are rows to consume from the upstream worker. The function in turn calls methods on the Input port to consume incoming rows, until it has exhausted the currently available incoming rows. 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<RowsActionTarget<TInput>, 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.

    Returns
    Type Description
    RowsActionTarget<TInput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInput

    The type of the input rows.

    Exceptions
    Type Condition
    ArgumentNullException

    inputRowsFunc

    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?

    RowsActionTarget<TInput>(in DownstreamFactory<TInput>, String, Func<RowsActionTarget<TInput>, Task<ProgressStatus>>, Func<RowsActionTarget<TInput>, Task<ProgressStatus>>, Func<RowsActionTarget<TInput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>>)

    Initializes a new instance of the RowsActionTarget<TInput> dataflow worker, which repeatedly executes a asynchronous function when there are rows to consume from the upstream worker.

    The Input port is linked to (if available) the upstream output or error output port specified by the factory.

    Declaration
    public static RowsActionTarget<TInput> RowsActionTarget<TInput>(this in DownstreamFactory<TInput> downstreamFactory, string workerName, Func<RowsActionTarget<TInput>, Task<ProgressStatus>> startingFuncAsync, Func<RowsActionTarget<TInput>, Task<ProgressStatus>> inputRowsFuncAsync, Func<RowsActionTarget<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 "/" (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<RowsActionTarget<TInput>, 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<RowsActionTarget<TInput>, Task<ProgressStatus>> inputRowsFuncAsync

    An asynchronous function that is called when there are rows to consume from the upstream worker. The function in turn calls methods on the Input port to consume incoming rows, until it has exhausted the currently available incoming rows. 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<RowsActionTarget<TInput>, 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.

    Returns
    Type Description
    RowsActionTarget<TInput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInput

    The type of the input rows.

    Exceptions
    Type Condition
    ArgumentNullException

    inputRowsFuncAsync

    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?

    RowsActionTarget<TInput>(in DownstreamFactory<TInput>, String, Func<RowsActionTarget<TInput>, Task>)

    Initializes a new instance of the RowsActionTarget<TInput> dataflow worker, which repeatedly executes a asynchronous action when there are rows to consume from the upstream worker.

    The Input port is linked to (if available) the upstream output or error output port specified by the factory.

    Declaration
    public static RowsActionTarget<TInput> RowsActionTarget<TInput>(this in DownstreamFactory<TInput> downstreamFactory, string workerName, Func<RowsActionTarget<TInput>, Task> inputRowsActionAsync)
        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 "/" (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<RowsActionTarget<TInput>, Task> inputRowsActionAsync

    An asynchronous action that is called when there are rows to consume from the upstream worker. The action receives the worker as a parameter, and calls methods on the Input port to consume incoming rows, until it has exhausted the currently available incoming rows.

    Returns
    Type Description
    RowsActionTarget<TInput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInput

    The type of the input rows.

    Exceptions
    Type Condition
    ArgumentNullException

    inputRowsActionAsync

    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

    RowsActionTarget<TInput>
    In This Article
    Back to top Copyright © 2023 Envobi Ltd