예제 #1
0
 public static Dictionary <string, object> GetCommandLineOptions()
 {
     return(OPTION_PARSERS
            .Select(
                kv => new { Option = kv.Key, Parser = kv.Value }
                ).ToDictionary(
                optionAndValue => optionAndValue.Option,
                optionAndValue => (
                    (optionAndValue.Parser != null) ?
                    optionAndValue.Parser(CommandLineUtil.GetCommandLineOption(optionAndValue.Option, expectOptionValue: true)) :
                    CommandLineUtil.HasCommandLineOption(optionAndValue.Option, expectOptionValue: false)
                    )
                ));
 }
예제 #2
0
 public static IEnumerable <string> GetInvalidOptions()
 {
     return(CommandLineUtil.GetAllCommandLineOptionSwitches()
            .Where(optionSwitch => !ALL_VALID_OPTONS.Contains(optionSwitch))
            .ToList());
 }