Esempio n. 1
0
 /// <summary>
 /// Parses a command line string value using an argument.
 /// </summary>
 /// <param name="argument">The argument 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 Argument argument,
     string[] args) =>
 argument.GetOrCreateDefaultSimpleParser().Parse(args);
Esempio n. 2
0
 /// <summary>
 /// Parses a command line string value using an argument.
 /// </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="argument">The argument 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 Argument argument,
     string commandLine) =>
 argument.GetOrCreateDefaultSimpleParser().Parse(commandLine);