public void Run() { _loggingService.Log(); if (_variableService.Get() == null) { _loggingService.Log("There are no variables saved."); return; } if (_variableService.Get().Count == 0) { _loggingService.Log("There are no variables saved."); return; } foreach (var variable in _variableService.Get()) { _loggingService.LogResult($" {variable.Key} {variable.Value} ({variable.Value.GetType()})"); } }
public object GetVariable(string name) { try { if (name == null) { name = ReadLine("variable name"); } return(variableService.Get(name)); } catch (Exception ex) { SetException(ex); return(null); } }