/// <summary> /// Parses Command Line Arguments. /// Use CommandLineArgumentAttributes to control parsing behaviour. /// </summary> /// <param name="arguments"> The actual arguments. </param> /// <param name="destination"> The resulting parsed arguments. </param> /// <param name="reporter"> The destination for parse errors. </param> public static void ParseCommandLineArguments(string[] arguments, object destination, ErrorReporter reporter) { CommandLineArgumentParser parser = new CommandLineArgumentParser(destination.GetType(), reporter); if (!parser.Parse(arguments, destination)) { throw new Exception("Parsing failed"); } }
/// <summary> /// Parses Command Line Arguments. /// Use CommandLineArgumentAttributes to control parsing behaviour. /// </summary> /// <param name="arguments"> The actual arguments. </param> /// <param name="destination"> The resulting parsed arguments. </param> /// <param name="reporter"> The destination for parse errors. </param> public static void ParseCommandLineArguments(string[] arguments, object destination, ErrorReporter reporter) { CommandLineArgumentParser parser = new CommandLineArgumentParser(destination.GetType(), reporter); if (!parser.Parse(arguments, destination)) throw new Exception("Parsing failed"); }