public MessageContext ( string messageId, string>.Dictionary |
||
messageId | string | Native message id. |
headers | string>.Dictionary | The message headers. |
body | byte | The message body. |
transportTransaction | Transaction (along with connection if applicable) used to receive the message. | |
receiveCancellationTokenSource | /// 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 |
public MessageContext(string messageId, Dictionary<string, string> headers, byte[] body, TransportTransaction transportTransaction, CancellationTokenSource receiveCancellationTokenSource, ContextBag context)
{
Guard.AgainstNullAndEmpty(nameof(messageId), messageId);
Guard.AgainstNull(nameof(body), body);
Guard.AgainstNull(nameof(headers), headers);
Guard.AgainstNull(nameof(transportTransaction), transportTransaction);
Guard.AgainstNull(nameof(receiveCancellationTokenSource), receiveCancellationTokenSource);
Guard.AgainstNull(nameof(context), context);
Headers = headers;
Body = body;
MessageId = messageId;
Context = context;
TransportTransaction = transportTransaction;
ReceiveCancellationTokenSource = receiveCancellationTokenSource;
}