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) }); }
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)), })); }
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 })); }