ScheduleSend() public static method

public static ScheduleSend ( IMessageScheduler scheduler, Uri destinationAddress, System.DateTime scheduledTime, object message, Type messageType, CancellationToken cancellationToken ) : Task
scheduler IMessageScheduler
destinationAddress System.Uri
scheduledTime System.DateTime
message object
messageType System.Type
cancellationToken System.Threading.CancellationToken
return Task
Example #1
0
        Task <ScheduledMessage> IMessageScheduler.ScheduleSend(Uri destinationAddress, DateTime scheduledTime, object message, Type messageType,
                                                               IPipe <SendContext> pipe, CancellationToken cancellationToken)
        {
            if (destinationAddress == null)
            {
                throw new ArgumentNullException(nameof(destinationAddress));
            }

            if (message == null)
            {
                throw new ArgumentNullException(nameof(message));
            }

            if (messageType == null)
            {
                throw new ArgumentNullException(nameof(messageType));
            }

            if (pipe == null)
            {
                throw new ArgumentNullException(nameof(pipe));
            }

            return(MessageSchedulerConverterCache.ScheduleSend(this, destinationAddress, scheduledTime, message, messageType, pipe, cancellationToken));
        }
        public Task <ScheduledMessage> ScheduleSend(Uri destinationAddress, DateTime scheduledTime, object message,
                                                    CancellationToken cancellationToken)
        {
            if (destinationAddress == null)
            {
                throw new ArgumentNullException(nameof(destinationAddress));
            }
            if (message == null)
            {
                throw new ArgumentNullException(nameof(message));
            }
            var messageType = message.GetType();

            return(MessageSchedulerConverterCache.ScheduleSend(this, destinationAddress, scheduledTime, message, messageType, cancellationToken));
        }