Exemplo n.º 1
0
 /// <summary>
 /// This method does load all modules and factories in the given assembly.
 /// </summary>
 void LoadModulesAndFactories(Assembly assembly)
 {
     foreach (Type type in assembly.GetTypes())
     {
         if (!type.IsAbstract)
         {
             if (type.IsSubclassOf(typeof(AbstractModule)) && Attribute.GetCustomAttribute(type, typeof(ModuleNameAttribute)) != null)
             {
                 moduleFactory.AddModuleBuilder(new ModuleBuilder(type.FullName, assembly));
             }
         }
     }
 }