Beispiel #1
0
        public bool Check()
        {
            var actual = _trigger.Check();

            if (!_stuck)
            {
                _stuck = true;
                return(actual);
            }

            if (!actual)
            {
                _stuck = false;
            }

            return(false);
        }
Beispiel #2
0
        public bool Check()
        {
            var now = Now;

            if (!CanTrigger(now))
            {
                return(false);
            }

            var result = _trigger.Check();

            if (result)
            {
                UpdateLastTrigger(now);
            }

            return(result);
        }
Beispiel #3
0
        public bool Check()
        {
            var result = !_trigger.Check();

            return(result);
        }