Exemplo n.º 1
0
        public void ClearTimeOut(string name)
        {
            TimeOutCmd timeOut = GetTimeOut(name);

            if (timeOut != null)
            {
                timeOut.Dispose();
                _Timers.Remove(timeOut);
            }
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        public void SetTimeOut(string name, DateTime at, IQHsm hsm, IQEvent ev, TimeOutType timeOutType)
        {
            TimeOutCmd timeOut = CreateTimeOut(name, at, hsm, ev, timeOutType);

            SetTimeOut(timeOut);
        }
Exemplo n.º 4
0
        public void SetTimeOut(string name, TimeSpan duration, IQHsm hsm, IQEvent ev, TimeOutType timeOutType)
        {
            TimeOutCmd timeOut = CreateTimeOut(name, duration, hsm, ev, timeOutType);

            SetTimeOut(timeOut);
        }
Exemplo n.º 5
0
        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);
        }