本文整理匯總了C#中Quartz.Impl.Triggers.CalendarIntervalTriggerImpl.GetScheduleBuilder方法的典型用法代碼示例。如果您正苦於以下問題:C# CalendarIntervalTriggerImpl.GetScheduleBuilder方法的具體用法?C# CalendarIntervalTriggerImpl.GetScheduleBuilder怎麽用?C# CalendarIntervalTriggerImpl.GetScheduleBuilder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Quartz.Impl.Triggers.CalendarIntervalTriggerImpl
的用法示例。
在下文中一共展示了CalendarIntervalTriggerImpl.GetScheduleBuilder方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: ShouldGetScheduleBuilderWithSameSettingsAsTrigger
public void ShouldGetScheduleBuilderWithSameSettingsAsTrigger()
{
var startTime = DateTimeOffset.UtcNow;
var endTime = DateTimeOffset.UtcNow.AddDays(1);
var trigger = new CalendarIntervalTriggerImpl("name", "group", startTime, endTime, IntervalUnit.Hour, 10);
trigger.PreserveHourOfDayAcrossDaylightSavings = true;
trigger.SkipDayIfHourDoesNotExist = true;
trigger.TimeZone = TimeZoneInfo.Utc;
trigger.MisfireInstruction = MisfireInstruction.CalendarIntervalTrigger.FireOnceNow;
var scheduleBuilder = trigger.GetScheduleBuilder();
var cloned = (CalendarIntervalTriggerImpl) scheduleBuilder.Build();
Assert.That(cloned.PreserveHourOfDayAcrossDaylightSavings, Is.EqualTo(trigger.PreserveHourOfDayAcrossDaylightSavings));
Assert.That(cloned.SkipDayIfHourDoesNotExist, Is.EqualTo(trigger.SkipDayIfHourDoesNotExist));
Assert.That(cloned.RepeatInterval, Is.EqualTo(trigger.RepeatInterval));
Assert.That(cloned.RepeatIntervalUnit, Is.EqualTo(trigger.RepeatIntervalUnit));
Assert.That(cloned.MisfireInstruction, Is.EqualTo(trigger.MisfireInstruction));
Assert.That(cloned.TimeZone, Is.EqualTo(trigger.TimeZone));
}