Table of Contents

Class InMemoryCommandQueue

Namespace
Savvyio.Commands.Messaging
Assembly
Savvyio.Commands.Messaging.dll

Provides an in-memory implementation of the IPointToPointChannel<TRequest> interface useful for unit testing and the likes thereof.

public class InMemoryCommandQueue : IPointToPointChannel<ICommand>, ISender<ICommand>, IReceiver<ICommand>
Inheritance
Object
InMemoryCommandQueue
Implements

Methods

ReceiveAsync(Action<AsyncOptions>)

Receive one or more command(s) asynchronous using Point-to-Point Channel/P2P MEP.

public async IAsyncEnumerable<IMessage<ICommand>> ReceiveAsync(Action<AsyncOptions> setup = null)

Parameters

setup Action<AsyncOptions>

The AsyncOptions which may be configured.

Returns

IAsyncEnumerable<IMessage<ICommand>>

A task that represents the asynchronous operation. The task result contains a sequence of IMessage<T> whose generic type argument is ICommand.

SendAsync(IEnumerable<IMessage<ICommand>>, Action<AsyncOptions>)

Sends the specified messages whose generic type argument is ICommand asynchronous using Point-to-Point Channel/P2P MEP.

public async Task SendAsync(IEnumerable<IMessage<ICommand>> messages, Action<AsyncOptions> setup = null)

Parameters

messages IEnumerable<IMessage<ICommand>>

The ICommand enclosed messages to send.

setup Action<AsyncOptions>

The AsyncOptions which may be configured.

Returns

Task

A System.Threading.Tasks.Task that represents the asynchronous operation.