Search Results for

    Show / Hide Table of Contents

    Class OutputPortBase<TOutput>

    Generic base class for dataflow ports, containing the functionality that depends on the type of the row class.

    The library user only uses this class via OutputPort<TOutput> and ErrorOutputPort<TError>.

    Note: As per normal, unless otherwise noted, the instance members are not thread-safe, and should only be used from the worker that the port belongs to.

    Inheritance
    Object
    OutputPortBase
    OutputPortBase<TOutput>
    ErrorOutputPort<TError>
    OutputPort<TOutput>
    Inherited Members
    OutputPortBase.BufferCapacity
    OutputPortBase.IsErrorOutput
    OutputPortBase.IsLinked
    OutputPortBase.Locator
    OutputPortBase.Logger
    OutputPortBase.Name
    OutputPortBase.RowsPerBuffer
    OutputPortBase.RowsSent
    OutputPortBase.SendError(String, Exception, String, String[])
    OutputPortBase.SendError(String, String, String[])
    OutputPortBase.SendError(String, Exception)
    OutputPortBase.SendError(String)
    OutputPortBase.SendSucceeded()
    OutputPortBase.State
    OutputPortBase.ToLongString()
    OutputPortBase.ToString()
    OutputPortBase.Worker
    OutputPortBase.DebugCommands
    OutputPortBase.DebugBreakAfterRows
    OutputPortBase.ActiveDuration
    OutputPortBase.InstantActive
    OutputPortBase.InstantCompleted
    Namespace: actionETL
    Assembly: actionETL.dll
    Syntax
    public abstract class OutputPortBase<TOutput> : OutputPortBase where TOutput : class
    Type Parameters
    Name Description
    TOutput

    The type of the rows.

    Properties

    ClearRowErrors

    If the property is true and the CaptureRowErrors field is present in the TOutput output type, any row errors in the RowErrors list will be cleared from all rows passing though the output port.

    This is typically used to clear row errors after having handled them (e.g. by correcting the data, or checking the error is benign). Although optional, clearing the errors avoids combining earlier 'handled' errors with later 'unhandled' errors.

    Also see Clear().

    Note: This property is thread-safe.

    Declaration
    public bool ClearRowErrors { get; set; }
    Property Value
    Type Description
    Boolean
    Exceptions
    Type Condition
    InvalidOperationException

    Cannot set ClearRowErrors after the port is in state Ready or later.

    Link

    Gets the dataflow downstream factory for creating one transform or target worker linked to this output or error output port.

    Note that in the returned factory, the UpstreamPort will always be set to this port.

    Also see GetDownstreamFactory<TInput>(), which is only rarely needed, e.g. when a transform or target is created before their upstream worker has been created. See Worker Instantiation and Transform and Target Factory Methods for further details.

    Note: This property is thread-safe.

    Declaration
    public DownstreamFactory<TOutput> Link { get; }
    Property Value
    Type Description
    DownstreamFactory<TOutput>

    The dataflow downstream factory for creating one transform or target worker linked to this output or error output port.

    LinkedTo

    Gets the downstream input port this output (or error output) port is linked to, or null if it is not linked.

    Note: This property is thread-safe.

    Declaration
    public InputPort<TOutput> LinkedTo { get; }
    Property Value
    Type Description
    InputPort<TOutput>

    Methods

    LinkTo(InputPort<TOutput>)

    Link this output (or error output) port to a specified downstream input port, which must have the same row type.

    Note that all input and regular output ports must be linked to a single port when its parent worker starts. For error output ports, linking is optional.

    After linking, ports cannot be relinked. It is however possible to remove all child workers from a parent worker, and recreate them with different links.

    When linking from an ErrorOutputPort<TError>, the MaxRowsBeforeError and MaxRowsSent properties can limit the number of allowed error rows.

    Note: This method is thread-safe.

    Declaration
    public void LinkTo(InputPort<TOutput> inputPort)
    Parameters
    Type Name Description
    InputPort<TOutput> inputPort

    The downstream input port to link to.

    Exceptions
    Type Condition
    ArgumentNullException

    inputPort

    InvalidOperationException
    • Both ports must be in the Created state
    • An output (or error output) port can only be linked to one input port, and vice versa
    • Linked dataflow workers must have the same parent worker
    • Cannot link ports after the parent worker has started running its children.

    SetDebugCommands(DebugPortCommands)

    Sets the debug command. This has the same effect as setting the DebugCommands, see that property for details.

    Note: This method is thread-safe.

    Declaration
    public OutputPortBase<TOutput> SetDebugCommands(DebugPortCommands debugPortCommands)
    Parameters
    Type Name Description
    DebugPortCommands debugPortCommands

    The debug port commands.

    Returns
    Type Description
    OutputPortBase<TOutput>

    The output port itself, to allow a fluent coding style.

    SetDebugCommands(DebugPortCommands, Int64)

    Sets the debug commands.

    Note that unlike DebugCommands, DebugBreakAfterRows, and SetDebugCommands(DebugPortCommands), this method sets and overwrites the commands exactly as specified, and does not take any special action regarding OnRows.

    Note: This method is thread-safe.

    Declaration
    public OutputPortBase<TOutput> SetDebugCommands(DebugPortCommands debugPortCommands, long debugBreakAfterRows)
    Parameters
    Type Name Description
    DebugPortCommands debugPortCommands

    The debug port commands for when to launch and/or break a debugger when debugging dataflow ports. Multiple commands can be set at the same time by combining them with bitwise OR (| in C#).

    The various "On..." commands defines when to break or launch the debugger, while Launch and Break defines what to do, i.e. launching and/or breaking the debugger. In most debugging scenarios, both one or more "On..." commands, as well as Launch and/or Break, should be set.

    There are also several predefined combinations, e.g. BreakOnRowsAndStateCompleted that is very useful for viewing rows sent from an output or error output port.

    Note: Any Launch command will be automatically downgraded to a Break command after the first attempt to launch a debugger.

    Note: To view the dataflow rows while debugging, DebugCommands must be set to something other than None when the port worker initially runs.

    Int64 debugBreakAfterRows

    The number of rows sent after which to execute any debug command, e.g. break any attached debugger. A value of zero will break every time rows are sent, while e.g. a value of 10000 will only start breaking after that many rows have been sent. Any negative value will disable breaking on rows.

    Returns
    Type Description
    OutputPortBase<TOutput>

    The output port itself, to allow a fluent coding style.

    See Also

    OutputPortBase
    OutputPort<TOutput>
    ErrorOutputPort<TError>
    OutputPortBaseState
    OutputPortCollection
    InputPort<TInput>
    In This Article
    Back to top Copyright © 2023 Envobi Ltd