void ExecuteFocusCommand(string s) { // TODO: power status check int step; if (!Int32.TryParse(s, out step)) { _eventAggregator.GetEvent <ExceptionEvent>() .Publish(new ArgumentException("Cannot parse the movement steps")); return; } // put the blocking action in a separated thread Task.Run(() => _serialService.ControlFocus(step)); }