コード例 #1
0
 public void Stop()
 {
     if (sender != null)
     {
         sender.StopSending();
     }
     if (serviceHost != null)
     {
         serviceHost.Close();
     }
     if (cleaner != null)
     {
         cleaner.Stop();
     }
 }
コード例 #2
0
        public Task StopAsync(CancellationToken cancellationToken)
        {
            NotifyService.Stop();

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

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

            return(Task.CompletedTask);
        }