Пример #1
0
        public IEnumerable <Command> FindInAssembly(Assembly[] assemblies)
        {
            List <Type> commands = new List <Type>();

            foreach (var assembly in assemblies)
            {
                var commandTypes = ReflectionUtilities.RetrieveTypesWithAttribute <CommandAttribute>(assembly);
                commands.AddRange(commandTypes);
            }

            return(commands.Select(FindInType));
        }
Пример #2
0
        public IEnumerable <Command> FindInAssembly(Assembly assembly)
        {
            var commandTypes = ReflectionUtilities.RetrieveTypesWithAttribute <CommandAttribute>(assembly);

            return(commandTypes.Select(FindInType));
        }