CQRS.NET  4.0
A lightweight enterprise Function as a Service (FaaS) framework to write function based serverless and micro-service applications in hybrid multi-datacentre, on-premise and Azure environments.

◆ PublishAndWait< TCommand, TEvent >() [5/6]

TEvent Cqrs.Commands.IPublishAndWaitCommandPublisher< TAuthenticationToken >.PublishAndWait< TCommand, TEvent > ( TCommand  command,
int  millisecondsTimeout,
IEventReceiver< TAuthenticationToken >  eventReceiver = null 
)

Publishes the provided command and waits for an event of TEvent or exits if the specified timeout is expired.

Parameters
commandThe TCommand to publish.
millisecondsTimeoutThe number of milliseconds to wait, or F:System.Threading.Timeout.Infinite (-1) to wait indefinitely.
eventReceiverIf provided, is the IEventReceiver<TAuthenticationToken> that the event is expected to be returned on.

Implemented in Cqrs.Bus.InProcessBus< TAuthenticationToken >, Cqrs.Azure.ServiceBus.AzureCommandBusPublisher< TAuthenticationToken >, Cqrs.Akka.Commands.AkkaCommandBus< TAuthenticationToken >, and Cqrs.Azure.ServiceBus.AzureCommandBusPublisher< TAuthenticationToken >.

Type Constraints
TCommand :ICommand<TAuthenticationToken>