コード例 #1
0
        async Task <ScheduledRecurringMessage <T> > ScheduleRecurringSend <T>(Uri destinationAddress, RecurringSchedule schedule, Task <T> message,
                                                                              CancellationToken cancellationToken)
            where T : class
        {
            ScheduleRecurringMessage <T> command = await CreateCommand(destinationAddress, schedule, message).ConfigureAwait(false);

            await _publishEndpoint.Publish(command, cancellationToken).ConfigureAwait(false);

            return(new ScheduledRecurringMessageHandle <T>(schedule, command.Destination, command.Payload));
        }
コード例 #2
0
        async Task <ScheduledRecurringMessage <T> > ScheduleRecurringSend <T>(Uri destinationAddress, RecurringSchedule schedule, Task <T> message,
                                                                              IPipe <SendContext> pipe,
                                                                              CancellationToken cancellationToken)
            where T : class
        {
            ScheduleRecurringMessage <T> command = await CreateCommand(destinationAddress, schedule, message).ConfigureAwait(false);

            var endpoint = await _schedulerEndpoint().ConfigureAwait(false);

            await endpoint.Send <ScheduleRecurringMessage>(command, pipe, cancellationToken).ConfigureAwait(false);

            return(new ScheduledRecurringMessageHandle <T>(schedule, command.Destination, command.Payload));
        }