Search Results for

    Show / Hide Table of Contents

    Class MessageCollection<T1, T2, T3>

    A collection of messages.

    Inheritance
    Object
    MessageCollection
    MessageCollection<T1, T2>
    MessageCollection<T1, T2, T3>
    MessageCollection<T1, T2, T3, T4>
    Implements
    IDisposable
    Inherited Members
    MessageCollection<T1, T2>.Message1
    MessageCollection<T1, T2>.Message2
    MessageCollection<T1, T2>.GetAllMessages()
    MessageCollection<T1, T2>.MarkAsConsumed(Message)
    MessageCollection<T1, T2>.Dispose(Boolean)
    MessageCollection.GetEnumerator()
    MessageCollection.MarkAsConsumed(Message)
    MessageCollection.Dispose()
    Namespace: Agents.Net
    Assembly: Agents.Net.dll
    Syntax
    public class MessageCollection<T1, T2, T3> : MessageCollection<T1, T2>, IDisposable where T1 : Message where T2 : Message where T3 : Message
    Type Parameters
    Name Description
    T1
    T2
    T3
    Remarks

    This is a helper class for the MessageCollector<T1, T2>

    Constructors

    | Improve this Doc View Source

    MessageCollection(MessageStore<T1>, MessageStore<T2>, MessageStore<T3>, MessageCollector<T1, T2>)

    Initialized a new instance of the class MessageCollection<T1, T2, T3>.

    Declaration
    public MessageCollection(MessageStore<T1> message1, MessageStore<T2> message2, MessageStore<T3> message3, MessageCollector<T1, T2> collector)
    Parameters
    Type Name Description
    MessageStore<T1> message1

    Message of type T1.

    MessageStore<T2> message2

    Message of type T2.

    MessageStore<T3> message3

    Message of type T3.

    MessageCollector<T1, T2> collector

    The MessageCollector<T1, T2> that produced this instance.

    Properties

    | Improve this Doc View Source

    Message3

    Message of type T3.

    Declaration
    public T3 Message3 { get; }
    Property Value
    Type Description
    T3

    Methods

    | Improve this Doc View Source

    Dispose(Boolean)

    Disposes all MessageStore<T>s contained in this collection

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    Boolean disposing
    Overrides
    Agents.Net.MessageCollection<T1, T2>.Dispose(System.Boolean)
    Remarks

    This releases the usage of the message and therefore potentially disposes the contained Message. When a message is used more than once in the MessageCollector<T1, T2>, the Agent that contains the MessageCollector<T1, T2> should mark the message with DelayDispose().

    | Improve this Doc View Source

    GetAllMessages()

    When overridden needs to return all messages in the collection.

    Declaration
    protected override IEnumerable<Message> GetAllMessages()
    Returns
    Type Description
    IEnumerable<Message>
    Overrides
    Agents.Net.MessageCollection<T1, T2>.GetAllMessages()

    Implements

    IDisposable
    • Improve this Doc
    • View Source
    In This Article
    Back to top © Copyright Tobias Wilker and contributors