Show / Hide Table of Contents

    Class GenericOutboundMessageFilter<TMessage>

    Can be used to filter the messages to be produced based on the message content.

    Inheritance
    object
    GenericOutboundMessageFilter<TMessage>
    Implements
    IOutboundMessageFilter
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Silverback.Messaging.Producing.Filter
    Assembly: Silverback.Integration.dll
    Syntax
    public class GenericOutboundMessageFilter<TMessage> : IOutboundMessageFilter
    Type Parameters
    Name Description
    TMessage

    The type of the messages to be filtered.

    Constructors

    GenericOutboundMessageFilter(Func<IOutboundEnvelope<TMessage>, bool>)

    Initializes a new instance of the GenericOutboundMessageFilter<TMessage> class.

    Declaration
    public GenericOutboundMessageFilter(Func<IOutboundEnvelope<TMessage>, bool> filter)
    Parameters
    Type Name Description
    Func<IOutboundEnvelope<TMessage>, bool> filter

    The filter function. If it returns true the message will be produced, otherwise it will be skipped.

    GenericOutboundMessageFilter(Func<TMessage?, bool>)

    Initializes a new instance of the GenericOutboundMessageFilter<TMessage> class.

    Declaration
    public GenericOutboundMessageFilter(Func<TMessage?, bool> filter)
    Parameters
    Type Name Description
    Func<TMessage, bool> filter

    The filter function. If it returns true the message will be produced, otherwise it will be skipped.

    Methods

    ShouldProduce(IOutboundEnvelope)

    Returns a value indicating whether the specified message should be produced.

    Declaration
    public bool ShouldProduce(IOutboundEnvelope envelope)
    Parameters
    Type Name Description
    IOutboundEnvelope envelope

    The envelope containing the message to be filtered.

    Returns
    Type Description
    bool

    A value indicating whether the message should be produced.

    Implements

    IOutboundMessageFilter
    GitHub E-Mail
    ↑ Back to top © 2026 Sergio Aquilini