void OnServiceStopped(ServiceStopped message) { if (_stopping) { _actorCache[message.ServiceName].Send(new UnloadService(message.ServiceName)); } EventChannel.Send(message); }
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); } } } }
protected virtual void OnServiceStopped(FileSystemEventArgs e) { ServiceStopped?.Invoke(this, null); }