public void ClearTimeOut(string name) { TimeOutCmd timeOut = GetTimeOut(name); if (timeOut != null) { timeOut.Dispose(); _Timers.Remove(timeOut); } }
protected void SetTimeOut(TimeOutCmd timeOut) { string name = timeOut.Name; TimeOutCmd oldTimeOut = GetTimeOut(name); if (oldTimeOut != null) { // only allow replace of timeout if for same hsm. System.Diagnostics.Debug.Assert(oldTimeOut.Hsm == timeOut.Hsm); oldTimeOut.Dispose(); _Timers.Remove(name); } _Timers.Add(name, timeOut); }
public void SetTimeOut(string name, DateTime at, IQHsm hsm, IQEvent ev, TimeOutType timeOutType) { TimeOutCmd timeOut = CreateTimeOut(name, at, hsm, ev, timeOutType); SetTimeOut(timeOut); }
public void SetTimeOut(string name, TimeSpan duration, IQHsm hsm, IQEvent ev, TimeOutType timeOutType) { TimeOutCmd timeOut = CreateTimeOut(name, duration, hsm, ev, timeOutType); SetTimeOut(timeOut); }
protected void SetTimeOut(TimeOutCmd timeOut) { string name = timeOut.Name; TimeOutCmd oldTimeOut = GetTimeOut (name); if (oldTimeOut != null) { // only allow replace of timeout if for same hsm. System.Diagnostics.Debug.Assert (oldTimeOut.Hsm == timeOut.Hsm); oldTimeOut.Dispose (); _Timers.Remove (name); } _Timers.Add (name, timeOut); }