public void ServiceStop() { lock (this) { EventStop?.Invoke(); EventStart = null; EventStop = null; EventShutDown = null; } }
/// <summary> /// 插件停止时,运行一次这里 /// </summary> /// <param name="json"></param> /// <returns></returns> private Boolean Do_EventStop(string json) { try { EventStopArgs eventStopArgs = JsonConvert.DeserializeObject <EventStopArgs>(json); EventStop?.Invoke(this, eventStopArgs); return(true); } catch (Exception ex) { DebugMessage(ex.Message); DebugMessage(ex.StackTrace); return(false); } }
public void Stop() { isActiv = false; _time.Stop(); EventStop?.Invoke(); }