Example #1
0
        void OnServiceStopped(ServiceStopped message)
        {
            if (_stopping)
            {
                _actorCache[message.ServiceName].Send(new UnloadService(message.ServiceName));
            }

            EventChannel.Send(message);
        }
Example #2
0
 private static void ValidateServicesRunning(object sender, ElapsedEventArgs e)
 {
     foreach (string serviceName in services)
     {
         using (ServiceController sc = new ServiceController(serviceName))
         {
             if (sc.Status != ServiceControllerStatus.Running)
             {
                 ServiceStopped?.Invoke(null, serviceName);
             }
         }
     }
 }
Example #3
0
 protected virtual void OnServiceStopped(FileSystemEventArgs e)
 {
     ServiceStopped?.Invoke(this, null);
 }