public IActionResult Process() { this.CheckConsistency(); IActionResult result = null; if (act != null) { MilSpace.Core.Logger.Info(string.Format("Action \"{0}\" processing", act.ActionId)); this.started = DateTime.Now; state = ActionStatesEnum.Processing; if (ProcessMonitor != null) { ProcessMonitorDelegate = ProcessMonitor; ProcessMonitorDelegate(act.Description, state); } currentTherad = Thread.CurrentThread; manualResetEvent = new ManualResetEvent(false); act.Process(); result = act.GetResult(); MilSpace.Core.Logger.Info(string.Format("Action \"{0}\" processed", act.ActionId)); result.PeocessId = this.ProcessId; state = ActionStatesEnum.Finished; ProcessMonitor?.Invoke(act.Description, state); this.performing = false; } processing.Remove(this); return(result); }