Class used to receive a message, obtain a list of received messages and the number of received messages, and to clear the message list.
Inherits: IMessageReceiver, ICleanable
Description
The TestMessageReceiver allows you to receive a message, obtain a list of received messages and the number of received messages, and to clear the message list.
Constructors
Creates a TestMessageReceiver component.
public
TestMessageReceiver()
Properties
messages
Gets the list of received messages.
public List<MessageEnvelope> Messages { get; }
MessageCount
Gets the received message count.
public int MessageCount { get; }
Instance methods
ClearAsync
Clears all received messagers.
public
Task ClearAsync(IContext context)
- context: IContext - (optional) a context to trace execution through a call chain.
ReceiveMessageAsync
Receives incoming message from the queue.
See also MessageEnvelope, IMessageQueue
public
Task ReceiveMessageAsync(MessageEnvelope message, IMessageQueue queue)
- envelope: MessageEnvelope - incoming message
- queue: IMessageQueue - queue where the message comes from