Load() public method

public Load ( string name ) : ConsoleExecuteResult
name string
return ConsoleExecuteResult
Exemplo n.º 1
0
 public static IEnumerable<ConsoleExecuteResult> RunMacro(string name)
 {
     _consoleMacro = new ConsoleMacro();
     _consoleMacro.Load(name);
     _consoleMacro.Running = true;
     if (_consoleMacro.Count == 0)
     {
         yield return new ConsoleExecuteResult("Macro not found or it contains no commands", new ConsoleExecuteAction(ConsoleExecuteActions.None, null));
     }
     else
     {
         foreach (var command in _consoleMacro.Values.Where(command => !string.IsNullOrWhiteSpace(command)))
         {
             yield return
                 new ConsoleExecuteResult("command",
                     new ConsoleExecuteAction(ConsoleExecuteActions.RunCommand, command));
         }
     }
     _consoleMacro = null;
 }
Exemplo n.º 2
0
 public static IEnumerable <ConsoleExecuteResult> RunMacro(string name)
 {
     _consoleMacro = new ConsoleMacro();
     _consoleMacro.Load(name);
     _consoleMacro.Running = true;
     if (_consoleMacro.Count == 0)
     {
         yield return(new ConsoleExecuteResult("Macro not found or it contains no commands", new ConsoleExecuteAction(ConsoleExecuteActions.None, null)));
     }
     else
     {
         foreach (var command in _consoleMacro.Values.Where(command => !string.IsNullOrWhiteSpace(command)))
         {
             yield return
                 (new ConsoleExecuteResult("command",
                                           new ConsoleExecuteAction(ConsoleExecuteActions.RunCommand, command)));
         }
     }
     _consoleMacro = null;
 }