コード例 #1
0
ファイル: DeviceCommandBase.cs プロジェクト: tomyqg/ULA
        public virtual void CheckIfCommandSucceed(IRuntimeDeviceViewModel runtimeDeviceViewModel)
        {
            bool isCommandSucceed = _rule.IsCommandSucceed(runtimeDeviceViewModel);

            if (isCommandSucceed)
            {
                _isCommandSucceed = true;
                CurrectCommandStateChanged?.Invoke();
            }
            else if (!_isCommandSucceed.HasValue)
            {
                _currentCommandcheckCounter++;
                if (_currentCommandcheckCounter == _commandCheckTimes)
                {
                    _isCommandSucceed = false;
                    CurrectCommandStateChanged?.Invoke();
                }
            }
        }
コード例 #2
0
 public override void CheckIfCommandSucceed(IRuntimeDeviceViewModel runtimeDevice)
 {
     _isCommandSucceed = IsCommandSent;
     CurrectCommandStateChanged?.Invoke();
 }