コード例 #1
0
        public object[] FormatParametersFor(ExecutableMethodInfo method)
        {
            if (method == null)
            {
                return new object[] { }
            }
            ;

            var methodParametersType = method.Parameters.Select(p => p.Type).ToList();

            return((
                       method.IsAcceptOptions && !HasOptions ?
                       ParametersWithOption :
                       Parameters
                       ).Select((param, i) =>
                                param.Value is IConvertible ?
                                Convert.ChangeType(param.Value, methodParametersType[i]) :
                                param.Value
                                ).ToArray());
        }
    }
コード例 #2
0
 public MultipleOptionsDefinitionException(ExecutableMethodInfo method)
 {
     Method = method;
 }
コード例 #3
0
 public ExecutableMethodParameterOrderException(ExecutableMethodInfo method)
 {
     Method = method;
 }
コード例 #4
0
 public UndefinedCommandOptionsException(ExecutableMethodInfo method)
 {
     Method = method;
 }