Class GenericOutboundHeadersEnricher<TMessage>
A generic enricher that adds a message header according to a static name/value pair or a provider function.
Inheritance
GenericOutboundHeadersEnricher<TMessage>
Implements
Inherited Members
Namespace: Silverback.Messaging.Outbound.Enrichers
Assembly: Silverback.Integration.dll
Syntax
public class GenericOutboundHeadersEnricher<TMessage> : IOutboundMessageEnricher where TMessage : class
Type Parameters
Name | Description |
---|---|
TMessage | The type of the messages to be enriched. |
Constructors
| Improve this doc View sourceGenericOutboundHeadersEnricher(string, Func<IOutboundEnvelope<TMessage>, object?>)
Initializes a new instance of the GenericOutboundHeadersEnricher<TMessage> class.
Declaration
public GenericOutboundHeadersEnricher(string name, Func<IOutboundEnvelope<TMessage>, object?> valueProvider)
Parameters
Type | Name | Description |
---|---|---|
string | name | The header name. |
Func<IOutboundEnvelope<TMessage>, object> | valueProvider | The header value provider function. |
GenericOutboundHeadersEnricher(string, object?)
Initializes a new instance of the GenericOutboundHeadersEnricher<TMessage> class.
Declaration
public GenericOutboundHeadersEnricher(string name, object? value)
Parameters
Type | Name | Description |
---|---|---|
string | name | The header name. |
object | value | The header value. |
Methods
| Improve this doc View sourceEnrich(IOutboundEnvelope)
Enriches the specified message.
Declaration
public void Enrich(IOutboundEnvelope envelope)
Parameters
Type | Name | Description |
---|---|---|
IOutboundEnvelope | envelope | The envelope containing the message to be enriched. |