Beispiel #1
0
        private static ParsedArguments Parse(string args)
        {
            var parser    = PowershellStyleArgumentGrammar.GetParser();
            var arguments = parser.List().Parse(args).Value.ToList();

            return(new ParsedArguments(arguments));
        }
Beispiel #2
0
 /// <summary>
 /// Use a Windows PowerShell syntax for arguments
 /// </summary>
 /// <param name="setup"></param>
 /// <returns></returns>
 public static IParserSetup UsePowershellStyleArgumentParser(this IParserSetup setup)
 {
     Assert.ArgumentNotNull(setup, nameof(setup));
     return(setup.UseArgumentParser(PowershellStyleArgumentGrammar.GetParser()));
 }