Search Results for

    Show / Hide Table of Contents

    Class OutputPortBaseStateExtensions

    Static helper methods for OutputPortBaseState.

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

    Methods

    IsActive(OutputPortBaseState)

    Extension method that returns true if the state is one where data will continue to be sent to the downstream input port (i.e. Active); otherwise, false.

    Note that this only checks the port state, it does not check whether there is sufficient demand to send rows, which can instead be done automatically with methods such as TrySendBuffer(TOutput[]), or explicitly with properties such as HasRowDemand.

    Declaration
    public static bool IsActive(this OutputPortBaseState outputPortBaseState)
    Parameters
    Type Name Description
    OutputPortBaseState outputPortBaseState

    Output port state.

    Returns
    Type Description
    Boolean

    IsCompleted(OutputPortBaseState)

    Extension method that returns true if the state is completed (i.e. Succeeded, or Error; otherwise, false.

    Declaration
    public static bool IsCompleted(this OutputPortBaseState outputPortBaseState)
    Parameters
    Type Name Description
    OutputPortBaseState outputPortBaseState

    Output port state.

    Returns
    Type Description
    Boolean

    IsFailed(OutputPortBaseState)

    Extension method that returns true if the state is Error; otherwise, false.

    Note that IsFailed does not include the Canceled state, since Canceled is not a final port state.

    Declaration
    public static bool IsFailed(this OutputPortBaseState outputPortBaseState)
    Parameters
    Type Name Description
    OutputPortBaseState outputPortBaseState

    Output port state.

    Returns
    Type Description
    Boolean

    ToOutcomeStatus(OutputPortBaseState, Boolean)

    Extension method that returns the corresponding OutcomeStatus. Note that the returned value will never be Fatal.

    Declaration
    public static OutcomeStatus ToOutcomeStatus(this OutputPortBaseState outputPortBaseState, bool notCompletedIsSucceeded)
    Parameters
    Type Name Description
    OutputPortBaseState outputPortBaseState

    Output port state.

    Boolean notCompletedIsSucceeded

    If set to true, a not completed status will return Succeeded. If set to false, a not completed status will return throw an exception.

    Returns
    Type Description
    OutcomeStatus
    Exceptions
    Type Condition
    InvalidOperationException

    ToOutcomeStatus() is only defined where the completed state is known.

    ToProgressStatus(OutputPortBaseState)

    Extension method that returns the corresponding ProgressStatus.

    Note that the returned value will never be Fatal, and that Canceled will be converted to an Error status.

    Declaration
    public static ProgressStatus ToProgressStatus(this OutputPortBaseState outputPortBaseState)
    Parameters
    Type Name Description
    OutputPortBaseState outputPortBaseState

    Output port state.

    Returns
    Type Description
    ProgressStatus

    See Also

    OutputPortBaseState
    In This Article
    Back to top Copyright © 2023 Envobi Ltd