Prototype for event and action framework.
5 using System.Collections.Generic;
7 using System.Reflection;
8 using System.Runtime.Serialization;
12 public static class ReflectiveEnumerator
14 static ReflectiveEnumerator() { }
16 public static IEnumerable<T> GetEnumerableOfType<T>() where T : class
18 List<T> objects = new List<T>();
20 Assembly.GetAssembly(typeof(T)).GetTypes()
21 .Where(myType => myType.IsClass && !myType.IsAbstract && myType.IsSubclassOf(typeof(T))))
23 objects.Add((T)Activator.CreateInstance(type));
34 private IEnumerable<Action> Actions;
35 private IEnumerable<Event> Events;
39 Actions = ReflectiveEnumerator.GetEnumerableOfType<Action>();
40 Events = ReflectiveEnumerator.GetEnumerableOfType<Event>();