コード例 #1
0
 public static CommandClass CommandsForType(Type type, List <CommandClass> currentCommandClasses)
 {
     return(new CommandClass
     {
         ClassName = type.Name,
         ClassNameShort = ShortNameCreator.GetShortNameFor(type.Name, currentCommandClasses.Select(x => x.ClassNameShort)),
         Commands = GetCommandsForType(type)
     });
 }
コード例 #2
0
 private static IEnumerable <CommandParameter> CreateCommandParameter(IEnumerable <CommandParameter> exsistingValues, ParameterInfo parameter)
 {
     return(exsistingValues.Append(new CommandParameter
     {
         Name = parameter.Name,
         Type = parameter.ParameterType,
         Position = parameter.Position,
         Short = ShortNameCreator.GetShortNameFor(parameter.Name, exsistingValues.Select(x => x.Short)),
     }));
 }
コード例 #3
0
 private static IEnumerable <Command> GetCommandForMethod(IEnumerable <Command> exsistingValues, MethodInfo method)
 {
     return(exsistingValues.Append(new Command
     {
         CommandName = method.Name,
         CommandParameters = GetCommandParametersFor(method.GetParameters()),
         Short = ShortNameCreator.GetShortNameFor(method.Name, exsistingValues.Select(x => x.Short)),
         Method = method
     }));
 }