public async Task CancelScheduledSend(Uri destinationAddress, Guid tokenId)
        {
            var command = new CancelScheduledMessageCommand(tokenId);

            var endpoint = await _sendEndpointProvider.GetSendEndpoint(destinationAddress).ConfigureAwait(false);

            await endpoint.Send <CancelScheduledMessage>(command).ConfigureAwait(false);
        }
Example #2
0
        /// <summary>
        /// Cancel a scheduled message using the tokenId that was returned when the message was scheduled.
        /// </summary>
        /// <param name="endpoint">The endpoint of the scheduling service</param>
        /// <param name="tokenId">The tokenId of the scheduled message</param>
        public static async Task CancelScheduledSend(this ISendEndpoint endpoint, Guid tokenId)
        {
            var command = new CancelScheduledMessageCommand(tokenId);

            await endpoint.Send <CancelScheduledMessage>(command).ConfigureAwait(false);
        }
Example #3
0
        /// <summary>
        /// Cancel a scheduled message using the tokenId that was returned when the message was scheduled.
        /// </summary>
        /// <param name="bus"></param>
        /// <param name="tokenId">The tokenId of the scheduled message</param>
        public static async Task CancelScheduledMessage(this IPublishEndpoint bus, Guid tokenId)
        {
            var command = new CancelScheduledMessageCommand(tokenId);

            await bus.Publish <CancelScheduledMessage>(command).ConfigureAwait(false);
        }