コード例 #1
0
        public static object GetParsedOptionValue(this ICommandLine commandLine, string optionName)
        {
            var res = commandLine.GetOptionValue(optionName);

            IOption option = commandLine.ResolveOption(optionName);

            if (option == null)
            {
                return(null);
            }

            OptionType type = option.Type;

            return((res == null) ? null : TypeHandler.CreateValue(res.Value, type));
        }