本文整理匯總了C#中Quartz.Impl.StdSchedulerFactory.PauseAll方法的典型用法代碼示例。如果您正苦於以下問題:C# StdSchedulerFactory.PauseAll方法的具體用法?C# StdSchedulerFactory.PauseAll怎麽用?C# StdSchedulerFactory.PauseAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Quartz.Impl.StdSchedulerFactory
的用法示例。
在下文中一共展示了StdSchedulerFactory.PauseAll方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: ResumeScheduler
public virtual void ResumeScheduler()
{
IScheduler sched = null;
"Given a scheduler that is paused".Given(() =>
{//arrange
sched = new StdSchedulerFactory(_props).GetScheduler();
sched.Start();
sched.PauseAll();
});
"When calling resume all".When(() =>
{//act
sched.ResumeAll();
sched.GetDescription().LogMe(LogLevel.Debug);
});
"Then ".Then(() =>
{
sched.IsStarted.Should().BeTrue("it is still running.");
var groupNames = sched.GetJobGroupNames();
if (groupNames.Count == 0) Log.Info("No job groups found to resume.");
foreach (var groupName in groupNames)
{
Log.InfoFormat("GroupName = {0}", groupName);
sched.IsJobGroupPaused(groupName).Should().BeFalse("resume all should resume all job groups");
}
});
}