public void Execute(IEnumerable <string> paramList) { var paths = _service.GetPath(); foreach (var path in paths) { Console.WriteLine(path); } }
public void ListCommand(CommandLineApplication app) { app.Command("list", (cmd) => { cmd.Description = "List path Environment Variables"; cmd.OnExecute(() => { var patherService = new PatherService(); var paths = patherService.GetPath(); foreach (var path in paths) { Console.WriteLine(path); } return(0); }); }); }