Search Results for

    Show / Hide Table of Contents

    Class OutputPortCollection

    A collection of all (non-error) output ports for a worker, always available as Outputs.

    This class is used when you either don't need to know the row type of each output port, or you cast the port(s) to have the actual row type (using an explicit cast or ToArray<TOutput>()).

    Note that workers with ports typically add additional members that allow access to typed versions of the ports, and workers with an unknown number of output ports of the same type typically adds a OutputPortCollection<TOutput>.

    Inheritance
    Object
    OutputPortBaseCollection
    OutputPortCollection
    Implements
    IReadOnlyList<OutputPortBase>
    IReadOnlyCollection<OutputPortBase>
    IEnumerable<OutputPortBase>
    IEnumerable
    Inherited Members
    OutputPortBaseCollection.Count
    OutputPortBaseCollection.IEnumerable.GetEnumerator()
    OutputPortBaseCollection.SendSucceeded()
    OutputPortBaseCollection.Item[Int32]
    OutputPortBaseCollection.Item[String]
    OutputPortBaseCollection.ToArray()
    OutputPortBaseCollection.TotalRowsSent
    OutputPortBaseCollection.TrySendError(String, Exception, String, String[])
    OutputPortBaseCollection.TrySendError(String, Exception)
    OutputPortBaseCollection.TrySendError(String, String, String[])
    OutputPortBaseCollection.TrySendError(String)
    OutputPortBaseCollection.TrySendSucceeded()
    OutputPortBaseCollection.Worker
    Namespace: actionETL
    Assembly: actionETL.dll
    Syntax
    public class OutputPortCollection : OutputPortBaseCollection, IReadOnlyList<OutputPortBase>, IReadOnlyCollection<OutputPortBase>, IEnumerable<OutputPortBase>, IEnumerable

    Methods

    Create<TOutput>(String)

    Creates and adds an output port to the collection. Cannot be called after the worker parent has started running its children.

    Note: This method is thread-safe.

    Declaration
    public OutputPort<TOutput> Create<TOutput>(string outputPortName)
        where TOutput : class
    Parameters
    Type Name Description
    String outputPortName

    Name of the output port. Must be unique among the output ports on this worker.

    Returns
    Type Description
    OutputPort<TOutput>

    The created output port, which is often used to assign a typed output port member, e.g. "Output".

    Type Parameters
    Name Description
    TOutput

    The row type.

    Exceptions
    Type Condition
    ArgumentException
    • outputPortName cannot be null or only whitespace.
    • Output port name already exists.
    InvalidOperationException

    Cannot add port after the worker parent has started running its children.

    GetEnumerator()

    Returns an enumerator that iterates through the collection.

    Note: This method is not thread-safe; use ToArray<TOutput>() to get or iterate over the ports in a thread-safe manner.

    Declaration
    public IEnumerator<OutputPortBase> GetEnumerator()
    Returns
    Type Description
    IEnumerator<OutputPortBase>

    ToArray<TOutput>()

    Returns the output ports copied to a new array, with the ports cast to the generic output port type including row type. This is useful for workers where all output ports are of the same type.

    The caller can manipulate the array without affecting the worker, e.g. reordering the array items.

    Note: This method is thread-safe.

    Declaration
    public OutputPort<TOutput>[] ToArray<TOutput>()
        where TOutput : class
    Returns
    Type Description
    OutputPort<TOutput>[]
    Type Parameters
    Name Description
    TOutput

    The row type.

    Exceptions
    Type Condition
    InvalidCastException

    An element in the sequence cannot be cast to the specified type.

    Implements

    System.Collections.Generic.IReadOnlyList<T>
    System.Collections.Generic.IReadOnlyCollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable

    See Also

    OutputPortBaseCollection
    OutputPortBase
    OutputPort<TOutput>
    IReadOnlyList<T>
    ErrorOutputPortCollection
    OutputPortCollection<TOutput>
    InputPortCollection
    In This Article
    Back to top Copyright © 2023 Envobi Ltd