C# Class NServiceBus.Transport.MessageContext

Allows the transport to pass relevant info to the pipeline.
Show file Open project: Particular/NServiceBus Class Usage Examples

Public Methods

Method Description
MessageContext ( string messageId, string>.Dictionary headers, byte body, TransportTransaction transportTransaction, CancellationTokenSource receiveCancellationTokenSource, ContextBag context ) : System.Collections.Generic

Initializes the context.

Method Details

MessageContext() public method

Initializes the context.
public MessageContext ( string messageId, string>.Dictionary headers, byte body, TransportTransaction transportTransaction, CancellationTokenSource receiveCancellationTokenSource, ContextBag context ) : System.Collections.Generic
messageId string Native message id.
headers string>.Dictionary The message headers.
body byte The message body.
transportTransaction TransportTransaction Transaction (along with connection if applicable) used to receive the message.
receiveCancellationTokenSource System.Threading.CancellationTokenSource /// Allows the pipeline to flag that it has been aborted and the receive operation should be rolled back. /// It also allows the transport to communicate to the pipeline to abort if possible. Transports should check if the token /// has been aborted after invoking the pipeline and roll back the message accordingly. ///
context ContextBag Any context that the transport wants to be available on the pipeline.
return System.Collections.Generic