Exemplo n.º 1
0
 /// <summary>
 /// Parses an array strings using the specified command.
 /// </summary>
 /// <param name="command">The command to use to parse the command line input.</param>
 /// <param name="args">The string arguments to parse.</param>
 /// <returns>A parse result describing the outcome of the parse operation.</returns>
 public static ParseResult Parse(
     this Command command,
     params string[] args) =>
 command.GetOrCreateDefaultParser().Parse(args);
Exemplo n.º 2
0
 /// <summary>
 /// Parses a command line string value using the specified command.
 /// </summary>
 /// <remarks>The command line string input will be split into tokens as if it had been passed on the command line.</remarks>
 /// <param name="command">The command to use to parse the command line input.</param>
 /// <param name="commandLine">A command line string to parse, which can include spaces and quotes equivalent to what can be entered into a terminal.</param>
 /// <returns>A parse result describing the outcome of the parse operation.</returns>
 public static ParseResult Parse(
     this Command command,
     string commandLine) =>
 command.GetOrCreateDefaultParser().Parse(commandLine);