예제 #1
0
        /// <summary>
        /// 获取scheduler(策略:如果没有指定名称的调度器,那就使用默认的调度器)
        /// </summary>
        /// <param name="schedulerName"></param>
        /// <returns></returns>
        private IScheduler GetScheduler(string schedulerName)
        {
            //获取指定的scheduler
            IScheduler currentScheduler = null;

            if (!string.IsNullOrEmpty(schedulerName))
            {
                currentScheduler = _factory.GetScheduler(schedulerName).Result;
            }
            else
            {
                currentScheduler = StdSchedulerFactory.GetDefaultScheduler().Result;
            }

            return(currentScheduler);
        }
예제 #2
0
 private IScheduler GetScheduler(string name)
 {
     return(_factory.GetScheduler(name).Result);
 }