StephaneLenclud@210: // StephaneLenclud@210: StephaneLenclud@210: StephaneLenclud@210: using System; StephaneLenclud@210: using System.Collections.Generic; StephaneLenclud@210: using System.Linq; StephaneLenclud@210: using System.Reflection; StephaneLenclud@210: using System.Runtime.Serialization; StephaneLenclud@210: StephaneLenclud@210: namespace SharpLib.Ear StephaneLenclud@210: { StephaneLenclud@210: [DataContract] StephaneLenclud@210: public class EventActionManager StephaneLenclud@210: { StephaneLenclud@210: public static EventActionManager Current = null; StephaneLenclud@210: public IDictionary ActionTypes; StephaneLenclud@210: private IDictionary Events; StephaneLenclud@210: StephaneLenclud@210: public EventActionManager() StephaneLenclud@210: { StephaneLenclud@210: ActionTypes = Utils.Reflection.GetConcreteClassesDerivedFromByName(); StephaneLenclud@210: Events = Utils.Reflection.GetConcreteClassesInstanceDerivedFromByName(); StephaneLenclud@210: } StephaneLenclud@210: StephaneLenclud@210: public Event GetEvent() where T : class StephaneLenclud@210: { StephaneLenclud@210: return Events[typeof(T).Name]; StephaneLenclud@210: } StephaneLenclud@210: StephaneLenclud@210: } StephaneLenclud@210: }