public void Start() { XmlConfigurator.Configure(); serviceHost = new ServiceHost(typeof(NotifyService)); serviceHost.Open(); service = new NotifyService(); service.StartSending(); }
public NotifyServiceLauncher(NotifyServiceCfg notifyServiceCfg, NotifySender notifySender, NotifyService notifyService, NotifyCleaner notifyCleaner, WebItemManager webItemManager) { NotifyServiceCfg = notifyServiceCfg; NotifyService = notifyService; NotifySender = notifySender; NotifyCleaner = notifyCleaner; WebItemManager = webItemManager; }
public Task StartAsync(CancellationToken cancellationToken) { NotifyService.Start(); NotifySender.StartSending(); if (0 < NotifyServiceCfg.Schedulers.Count) { InitializeNotifySchedulers(); } NotifyCleaner.Start(); return(Task.CompletedTask); }
public void Start() { XmlConfigurator.Configure(); serviceHost = new ServiceHost(typeof(NotifyService)); serviceHost.Open(); service = new NotifyService(); service.StartSending(); if (0 < NotifyServiceCfg.Schedulers.Count) { InitializeNotifySchedulers(); } }
public Task StopAsync(CancellationToken cancellationToken) { NotifyService.Stop(); if (NotifySender != null) { NotifySender.StopSending(); } if (NotifyCleaner != null) { NotifyCleaner.Stop(); } return(Task.CompletedTask); }
public NotifyServiceLauncher( IOptions <NotifyServiceCfg> notifyServiceCfg, NotifySender notifySender, NotifyService notifyService, NotifyCleaner notifyCleaner, WebItemManager webItemManager, IServiceProvider serviceProvider, IOptionsMonitor <ILog> options) { NotifyServiceCfg = notifyServiceCfg.Value; NotifyService = notifyService; NotifySender = notifySender; NotifyCleaner = notifyCleaner; WebItemManager = webItemManager; ServiceProvider = serviceProvider; Log = options.Get("ASC.Notify"); }