当前位置: 首页>>代码示例>>C#>>正文


C# IScheduler类代码示例

本文整理汇总了C#中IScheduler的典型用法代码示例。如果您正苦于以下问题:C# IScheduler类的具体用法?C# IScheduler怎么用?C# IScheduler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IScheduler类属于命名空间,在下文中一共展示了IScheduler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: QuartzService

 public QuartzService()
 {
     InitializeComponent();
     logger = LogManager.GetLogger(GetType());
     ISchedulerFactory schedulerFactory = new StdSchedulerFactory();
     scheduler = schedulerFactory.GetScheduler();
 }
开发者ID:modulexcite,项目名称:Quartz.net.James,代码行数:7,代码来源:QuartzService.cs

示例2: WatchFile

        /// <summary>
        /// A simpler alternative to the irritatingly useless FileSystemWatcher
        /// </summary>
        /// <param name="file">The file to monitor</param>
        /// <param name="refreshPeriod">The refresh period.</param>
        /// <param name="scheduler">The scheduler.</param>
        /// <returns></returns>
        public static IObservable<FileNotification> WatchFile(this FileInfo file, TimeSpan? refreshPeriod = null,
            IScheduler scheduler = null)
        {
           return Observable.Create<FileNotification>(observer =>
            {
                var refresh = refreshPeriod ?? TimeSpan.FromMilliseconds(250);
                scheduler = scheduler ?? Scheduler.Default;

                FileNotification notification = null;
                return scheduler.ScheduleRecurringAction(refresh, () =>
                {
                    try
                    {
                        notification = notification == null
                            ? new FileNotification(file)
                            : new FileNotification(notification);

                        observer.OnNext(notification);
                    }
                    catch (Exception ex)
                    {
                        notification = new FileNotification(file, ex);
                        observer.OnNext(notification);
                    }
                });

            }).DistinctUntilChanged();
        }
开发者ID:ItsJustSean,项目名称:TailBlazer,代码行数:35,代码来源:FileInfoEx.cs

示例3: RepoWatcher

 public RepoWatcher(IGithubBrowser browser, Repo repoToWatch, IScheduler backgroundScheduler)
 {
     _timerDisposal = Observable
         .Interval(_defaultRefreshSpan, backgroundScheduler)
         .SelectMany(_ => browser.GetCommits(repoToWatch))
         .Subscribe(OnCommitsArrived);
 }
开发者ID:pgdotnet,项目名称:RxWorkshop,代码行数:7,代码来源:RepoWatcher.cs

示例4: FaxMessageService

 public FaxMessageService(IMessaggisticaService messaggisticaService, IScheduler scheduler, IConfigurationMessageService configurationService, IDaoFactory daoFactory)
 {
     _messaggisticaService = messaggisticaService;
     _scheduler = scheduler;
     _configurationService = configurationService;
     _daoFactory = daoFactory;
 }
开发者ID:gipasoft,项目名称:Sfera,代码行数:7,代码来源:FaxMessageService.cs

示例5: TestBlobCache

 internal TestBlobCache(Action disposer, 
     IScheduler scheduler, 
     IEnumerable<KeyValuePair<string, byte[]>> initialContents)
     : this(scheduler, initialContents)
 {
     inner = Disposable.Create(disposer);
 }
开发者ID:ThomasLebrun,项目名称:Akavache,代码行数:7,代码来源:TestBlobCache.cs

示例6: NotifyPropertyChangedBase

		public NotifyPropertyChangedBase(IScheduler scheduler) {
			if (scheduler != null) {
				this.scheduler = scheduler;
			} else {
				this.scheduler = Scheduler.Immediate;
			}
		}
开发者ID:zzilla,项目名称:ONVIF-Device-Manager,代码行数:7,代码来源:NotifyPropertyChangedBase.cs

示例7: LinkSpiderPipeline

 public LinkSpiderPipeline(string entityName, IScheduler nextSpiderScheduler, ISpider nextSpider, LinkSpiderPrepareStartUrls prepareStartUrls)
 {
     NextSpiderScheduler = nextSpiderScheduler;
     NextSpider = nextSpider;
     _prepareStartUrls = prepareStartUrls;
     _entityName = entityName;
 }
开发者ID:yalunwang,项目名称:DotnetSpider,代码行数:7,代码来源:LinkSpiderPipeline.cs

示例8: DefaultKayakSocket

 internal DefaultKayakSocket(Socket socket, IScheduler scheduler)
 {
     this.id = nextId++;
     this.socket = new SocketWrapper(socket);
     this.scheduler = scheduler;
     state = new KayakSocketState(false);
 }
开发者ID:paulecoyote,项目名称:kayak,代码行数:7,代码来源:KayakSocket.cs

示例9: Main

        static void Main(string[] args)
        {
            try
            {
                Console.Title = "QMail";
                Console.ForegroundColor = ConsoleColor.White;
                ISchedulerFactory sf = new StdSchedulerFactory();
                Scheduler = sf.GetScheduler();
                new TskInspectDetailJobTrigger();
                Scheduler.Start();

                for (var i = 0; i < 10; i++) {
                    Console.WriteLine();
                }

                Console.ForegroundColor = ConsoleColor.Yellow;

                Console.WriteLine("       ---------------------------------------------------");
                Console.WriteLine("       ...................QMail已启动......................");
                Console.WriteLine("       ...................请不要关闭此窗口.................");
                Console.WriteLine("       ---------------------------------------------------");
                for (var i = 0; i < 10; i++)
                {
                    Console.WriteLine();
                }
                Console.ReadLine();
            }
            catch (Exception e) {
                LogUtil.Logger.Error(e.Message);
            }
        }
开发者ID:shentianyi,项目名称:ifDataHouse,代码行数:31,代码来源:QmailRunner.cs

示例10: RemoveScheduler

 public void RemoveScheduler(IScheduler scheduler)
 {
     lock (_listLock)
     {
         _scheduleList.Remove(scheduler);
     }
 }
开发者ID:soshimozi,项目名称:Cron-Plugin-Service,代码行数:7,代码来源:SchedulerManager.cs

示例11: AddScheduler

 public void AddScheduler(IScheduler scheduler)
 {
     lock (_listLock)
     {
         _scheduleList.Add(scheduler);
     }
 }
开发者ID:soshimozi,项目名称:Cron-Plugin-Service,代码行数:7,代码来源:SchedulerManager.cs

示例12: TaskPool

 static TaskPool()
 {
     _taskpool = new TaskPool();
     ISchedulerFactory sf = new StdSchedulerFactory();
     _ische = sf.GetScheduler();
     _ische.Start();
 }
开发者ID:zwc00zwc,项目名称:TaskManager,代码行数:7,代码来源:TaskPool.cs

示例13: JobScheduler

		public JobScheduler(IScheduler quartzScheduler, Logger logger, ISystemSettings systemSettings)
		{
			this._quartzScheduler = DIHelper.VerifyParameter(quartzScheduler);
			this._logger = DIHelper.VerifyParameter(logger);
			this._systemSettings = DIHelper.VerifyParameter(systemSettings);

		}
开发者ID:gsbastian,项目名称:Sriracha.Deploy,代码行数:7,代码来源:JobScheduler.cs

示例14: TaskCoordinator

        public TaskCoordinator(IScheduler scheduler, Logger logger)
        {
            _logger = logger;
            _scheduler = scheduler;

            _logger.Info("TaskCoordincator started with scheduler: {0}", scheduler.SchedulerInstanceId);
        }
开发者ID:mamluka,项目名称:SpeedyMailer,代码行数:7,代码来源:TaskCoordinator.cs

示例15: ConfigureScheduledEvents

 //public void Echo(string message)
 //{
 //    Console.WriteLine(message);
 //    hubProxy.Invoke("commandSent", string.Empty, message);
 //}
 private static void ConfigureScheduledEvents(IScheduler sched)
 {
     foreach (var trigger in GetTriggers())
     {
         sched.ScheduleJob(JobBuilder.Create<PublishEvent>().Build(), trigger);
     }
 }
开发者ID:erichexter,项目名称:HomeAutomation,代码行数:12,代码来源:X10AgentService.cs


注:本文中的IScheduler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。