Exemplo n.º 1
0
        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()})");
            }
        }
Exemplo n.º 2
0
 public object GetVariable(string name)
 {
     try
     {
         if (name == null)
         {
             name = ReadLine("variable name");
         }
         return(variableService.Get(name));
     }
     catch (Exception ex)
     {
         SetException(ex);
         return(null);
     }
 }