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(); } } }
public override void CheckIfCommandSucceed(IRuntimeDeviceViewModel runtimeDevice) { _isCommandSucceed = IsCommandSent; CurrectCommandStateChanged?.Invoke(); }