public static void FetchAllNodules() { noduleTypes = new Dictionary <NoduleData, BaseNodule> (); foreach (Assembly assem in AppDomain.CurrentDomain.GetAssemblies().Where(a => a.FullName.Contains("Assembly"))) { foreach (Type type in assem.GetTypes().Where(a => !a.IsAbstract && a.IsClass && a.IsSubclassOf(typeof(BaseNodule)))) { if (type.GetCustomAttributes(false).Count() == 0) { continue; } NoduleAttribute attri = type.GetCustomAttributes(typeof(NoduleAttribute), false)[0] as NoduleAttribute; if (attri != null && !attri.Hide) { NoduleData data = new NoduleData(attri); noduleTypes.Add(data, NodeObject.CreateNew <BaseNodule> (data.GetClassName)); } } } }
public NoduleData(NoduleAttribute noduleAttri) { ContextPath = noduleAttri.ContextPath; allCompatibleNodules = noduleAttri.allCompatibleNodules; }