コード例 #1
0
        private static ParsedArguments Parse(string args)
        {
            var parser    = PosixStyleArgumentGrammar.GetParser();
            var arguments = parser.List().Parse(args).Value.ToList();

            return(new ParsedArguments(arguments));
        }
コード例 #2
0
 /// <summary>
 /// Use a POSIX-style argument syntax similar to many existing POSIX utilities
 /// </summary>
 /// <param name="setup"></param>
 /// <returns></returns>
 public static IParserSetup UsePosixStyleArgumentParser(this IParserSetup setup)
 {
     Assert.ArgumentNotNull(setup, nameof(setup));
     return(setup.UseArgumentParser(PosixStyleArgumentGrammar.GetParser()));
 }