/// <summary> /// Parses the command line /// </summary> /// <param name="commandLine">The command line to parse</param> /// <returns>The command line elements that were found</returns> public static IEnumerable <ICommandLineElement> Parse(string commandLine) { Result <string, ICommandLineElement> result = _parser.All(commandLine); while (result != null) { yield return(result.Value); result = _parser.All(result.Rest); } }
public IEnumerable <ICommandLineElement> Parse(string commandLine) { var parser = new StringCommandLineParser(); Result <string, ICommandLineElement> result = parser.All(commandLine); while (result != null) { yield return(result.Value); result = parser.All(result.Rest); } }