Class GenericOutboundMessageFilter<TMessage>
Can be used to filter the messages to be produced based on the message content.
Implements
Inherited Members
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 |
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 |
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. |