src/Miles.MassTransit.AspNet/HostingEnvrionmentMessageDispatchProcess.cs
/// <summary>
/// Initiates the dispatch of messages to the message queue.
/// </summary>
/// <remarks>
/// Assume control of the messages are being handed over to this process.
/// </remarks>
/// <param name="messages">The messages.</param>
/// <returns></returns>
Initiates the dispatch of messages to the message queue.
Initiates the dispatch of messages to the message queue .
public Task ExecuteAsync(IEnumerable<OutgoingMessageForDispatch> messages)
        {
            var messagesForDispatch = messages.ToList();
            HostingEnvironment.QueueBackgroundWorkItem(async cancellationToken =>
            {
                await process.ExecuteAsync(messagesForDispatch).ConfigureAwait(false);
            });
            return Task.CompletedTask;
        }
public Task ExecuteAsync ( IEnumerable < OutgoingMessageForDispatch > messages ) { var messagesForDispatch = messages . ToList ( ) ; HostingEnvironment . QueueBackgroundWorkItem ( async cancellationToken => { await process . ExecuteAsync ( messagesForDispatch ) . ConfigureAwait ( false ) ; } ) ; return Task . CompletedTask ; }
Initiates the dispatch of messages to the message queue.
Initiates the dispatch of messages to the message queue .
None
messages
IEnumerable<OutgoingMessageForDispatch>
None
remarks
Assume control of the messages are being handed over to this process.
Assume control of the messages are being handed over to this process .