void StopProcesses(object programm, EventArrivedEventArgs e) { string id = e.NewEvent.Properties["ProcessId"].Value.ToString(); if (runnedProgramms.ContainsKey(id)) { runnedProgramms.Remove(id); NotifyStop?.Invoke(id); } }
public void Start() { NotifySettings.Subscribe((n) => StartEncryption(n), CacheNotifyAction.Insert); NotifyStop.Subscribe((n) => StopEncryption(), CacheNotifyAction.Insert); }