コード例 #1
0
 public static ITaskSeriesTimer CreateTimer(IRecurrentCommand command, TimeSpan initialInterval,
     TimeSpan delayInterval, IBackgroundExceptionDispatcher backgroundExceptionDispatcher)
 {
     IDelayStrategy delayStrategy = new FixedDelayStrategy(delayInterval);
     ITaskSeriesCommand timerCommand = new RecurrentTaskSeriesCommand(command, delayStrategy);
     return new TaskSeriesTimer(timerCommand, backgroundExceptionDispatcher, Task.Delay(initialInterval));
 }
コード例 #2
0
 public static ITaskSeriesTimer CreateTimer(IRecurrentCommand command, TimeSpan normalInterval,
     TimeSpan minimumInterval, IBackgroundExceptionDispatcher backgroundExceptionDispatcher)
 {
     IDelayStrategy delayStrategy = new LinearSpeedupStrategy(normalInterval, minimumInterval);
     ITaskSeriesCommand timerCommand = new RecurrentTaskSeriesCommand(command, delayStrategy);
     return new TaskSeriesTimer(timerCommand, backgroundExceptionDispatcher, Task.Delay(normalInterval));
 }
コード例 #3
0
        public static ITaskSeriesTimer CreateTimer(IRecurrentCommand command, TimeSpan initialInterval,
                                                   TimeSpan delayInterval, IWebJobsExceptionHandler exceptionHandler)
        {
            IDelayStrategy     delayStrategy = new FixedDelayStrategy(delayInterval);
            ITaskSeriesCommand timerCommand  = new RecurrentTaskSeriesCommand(command, delayStrategy);

            return(new TaskSeriesTimer(timerCommand, exceptionHandler, Task.Delay(initialInterval)));
        }
コード例 #4
0
        public static ITaskSeriesTimer CreateTimer(IRecurrentCommand command, TimeSpan normalInterval,
                                                   TimeSpan minimumInterval, IBackgroundExceptionDispatcher backgroundExceptionDispatcher)
        {
            IDelayStrategy     delayStrategy = new LinearSpeedupStrategy(normalInterval, minimumInterval);
            ITaskSeriesCommand timerCommand  = new RecurrentTaskSeriesCommand(command, delayStrategy);

            return(new TaskSeriesTimer(timerCommand, backgroundExceptionDispatcher, Task.Delay(normalInterval)));
        }
コード例 #5
0
        public static ITaskSeriesTimer CreateTimer(IRecurrentCommand command, TimeSpan normalInterval,
                                                   TimeSpan minimumInterval, IWebJobsExceptionHandler exceptionHandler)
        {
            IDelayStrategy     delayStrategy = new LinearSpeedupStrategy(normalInterval, minimumInterval);
            ITaskSeriesCommand timerCommand  = new RecurrentTaskSeriesCommand(command, delayStrategy);

            return(new TaskSeriesTimer(timerCommand, exceptionHandler, Task.Delay(normalInterval)));
        }