Search Results for

    Show / Hide Table of Contents

    Class ActionTwoInputTransformFactory

    Factory methods that create an ActionTwoInputTransform<TLeftInput, TRightInput, TOutput> dataflow worker that executes an asynchronous callback once, which in turn consumes data from the upstream workers and sends data to the downstream worker. Both input ports and the output port can have rows of different types.

    Input data can be processed row by row via TakeRow() etc., or multiple rows can be processed via TryTakeBuffer(TInput[]) etc.

    Note that all dataflow workers must adhere to the Row Ownership rules.

    Note that the two inputs by default provide Full buffering of incoming data, which potentially can consume a large amount of memory. See BufferingMode for further details.

    Also see the ActionTransform example, which works in a similar way to these methods.

    The LeftInput 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
    ActionTwoInputTransformFactory
    Namespace: actionETL
    Assembly: actionETL.dll
    Syntax
    public static class ActionTwoInputTransformFactory
    Remarks

    These factory methods only have overloads with asynchronous callbacks, since using synchronous ones would require the function to block a thread when there is no downstream demand, which is not appropriate.

    Methods

    ActionTwoInputTransform<TLeftInput, TRightInput, TOutput>(in DownstreamFactory<TLeftInput>, String, OutputPortBase<TRightInput>, Func<ActionTwoInputTransform<TLeftInput, TRightInput, TOutput>, Task<OutcomeStatus>>)

    Initializes a new instance of the ActionTwoInputTransform<TLeftInput, TRightInput, TOutput> dataflow worker, that executes an asynchronous function once, which in turn consumes data from the upstream worker and sends data to the downstream worker.

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

    Declaration
    public static ActionTwoInputTransform<TLeftInput, TRightInput, TOutput> ActionTwoInputTransform<TLeftInput, TRightInput, TOutput>(this in DownstreamFactory<TLeftInput> downstreamFactory, string workerName, OutputPortBase<TRightInput> rightInputFrom, Func<ActionTwoInputTransform<TLeftInput, TRightInput, TOutput>, Task<OutcomeStatus>> funcAsync)
        where TLeftInput : class where TRightInput : class where TOutput : class
    Parameters
    Type Name Description
    DownstreamFactory<TLeftInput> downstreamFactory

    The downstream factory, which specifies the parent worker and (optionally) the upstream port to link the "first" LeftInput 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 "__".

    OutputPortBase<TRightInput> rightInputFrom

    The upstream output port to link the RightInput port to.

    Func<ActionTwoInputTransform<TLeftInput, TRightInput, TOutput>, Task<OutcomeStatus>> funcAsync

    An asynchronous function that consumes rows from the input ports, and sends rows to the Output port.

    Returns
    Type Description
    ActionTwoInputTransform<TLeftInput, TRightInput, TOutput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TLeftInput

    The type of each LeftInput row.

    TRightInput

    The type of each RightInput row.

    TOutput

    The type of the output rows.

    Exceptions
    Type Condition
    ArgumentNullException

    funcAsync

    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?

    ActionTwoInputTransform<TLeftInput, TRightInput, TOutput>(in DownstreamFactory<TLeftInput>, String, OutputPortBase<TRightInput>, Func<ActionTwoInputTransform<TLeftInput, TRightInput, TOutput>, Task>)

    Initializes a new instance of the ActionTwoInputTransform<TLeftInput, TRightInput, TOutput> dataflow worker, that executes an asynchronous action once, which in turn consumes data from the upstream worker and sends data to the downstream worker.

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

    Declaration
    public static ActionTwoInputTransform<TLeftInput, TRightInput, TOutput> ActionTwoInputTransform<TLeftInput, TRightInput, TOutput>(this in DownstreamFactory<TLeftInput> downstreamFactory, string workerName, OutputPortBase<TRightInput> rightInputFrom, Func<ActionTwoInputTransform<TLeftInput, TRightInput, TOutput>, Task> actionAsync)
        where TLeftInput : class where TRightInput : class where TOutput : class
    Parameters
    Type Name Description
    DownstreamFactory<TLeftInput> downstreamFactory

    The downstream factory, which specifies the parent worker and (optionally) the upstream port to link the "first" LeftInput 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 "__".

    OutputPortBase<TRightInput> rightInputFrom

    The upstream output port to link the RightInput port to.

    Func<ActionTwoInputTransform<TLeftInput, TRightInput, TOutput>, Task> actionAsync

    An asynchronous action that consumes rows from the input ports, and sends rows to the Output port.

    Returns
    Type Description
    ActionTwoInputTransform<TLeftInput, TRightInput, TOutput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TLeftInput

    The type of each LeftInput row.

    TRightInput

    The type of each RightInput row.

    TOutput

    The type of the output rows.

    Exceptions
    Type Condition
    ArgumentNullException

    actionAsync

    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

    ActionTwoInputTransform<TLeftInput, TRightInput, TOutput>
    ActionTransformFactory
    In This Article
    Back to top Copyright © 2023 Envobi Ltd