コード例 #1
0
        public void Start()
        {
            XmlConfigurator.Configure();

            serviceHost = new ServiceHost(typeof(NotifyService));
            serviceHost.Open();

            service = new NotifyService();
            service.StartSending();
        }
コード例 #2
0
 public NotifyServiceLauncher(NotifyServiceCfg notifyServiceCfg,
                              NotifySender notifySender,
                              NotifyService notifyService,
                              NotifyCleaner notifyCleaner,
                              WebItemManager webItemManager)
 {
     NotifyServiceCfg = notifyServiceCfg;
     NotifyService    = notifyService;
     NotifySender     = notifySender;
     NotifyCleaner    = notifyCleaner;
     WebItemManager   = webItemManager;
 }
コード例 #3
0
        public Task StartAsync(CancellationToken cancellationToken)
        {
            NotifyService.Start();
            NotifySender.StartSending();

            if (0 < NotifyServiceCfg.Schedulers.Count)
            {
                InitializeNotifySchedulers();
            }

            NotifyCleaner.Start();

            return(Task.CompletedTask);
        }
コード例 #4
0
        public void Start()
        {
            XmlConfigurator.Configure();

            serviceHost = new ServiceHost(typeof(NotifyService));
            serviceHost.Open();

            service = new NotifyService();
            service.StartSending();

            if (0 < NotifyServiceCfg.Schedulers.Count)
            {
                InitializeNotifySchedulers();
            }
        }
コード例 #5
0
        public void Start()
        {
            XmlConfigurator.Configure();

            serviceHost = new ServiceHost(typeof(NotifyService));
            serviceHost.Open();

            service = new NotifyService();
            service.StartSending();

            if (0 < NotifyServiceCfg.Schedulers.Count)
            {
                InitializeNotifySchedulers();
            }
        }
コード例 #6
0
        public Task StopAsync(CancellationToken cancellationToken)
        {
            NotifyService.Stop();

            if (NotifySender != null)
            {
                NotifySender.StopSending();
            }

            if (NotifyCleaner != null)
            {
                NotifyCleaner.Stop();
            }

            return(Task.CompletedTask);
        }
コード例 #7
0
 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");
 }