Exemple #1
0
        public static IEnumerable <Type> GetModuleInterfaces(string groupId = null)
        {
            CacheModuleTypes();

            foreach (Type type in cachedModuleInterfaces)
            {
                ModuleGroupAttribute groupAttribute = type.GetCustomAttribute <ModuleGroupAttribute>();
                if (groupId != null && (groupAttribute == null || groupAttribute.GroupId != groupId))
                {
                    continue;
                }

                yield return(type);
            }
        }
Exemple #2
0
        public static IEnumerable <Type> GetCustomModuleInterfaces()
        {
            CacheModuleTypes();

            foreach (Type type in cachedModuleInterfaces)
            {
                ModuleGroupAttribute groupAttribute = type.GetCustomAttribute <ModuleGroupAttribute>();
                if (groupAttribute != null && groupAttribute.GroupId == ModuleGroups.Core)
                {
                    continue;
                }

                yield return(type);
            }
        }