|
hallo, i want to implement some dynamic ObserverEvent Pattern. For this reason i have some Methods in a OForm attributet with a Custom "ObserverAttribute". During loading of this OForm i reflect over the methods which are attributet with this "ObserverAttribute" and rember the "MehtodInfo" of the attributet Method.
I have an "EventManager" (EM). In this EM i want to initiate an EventHander dynamically... like
----------------------------------------------------------------------- public void RegisterObserver(MethodInfo mi, EventMode eventMode) { switch (eventMode) { case EventMode.FilterChanged: FilterChanged += new FilterChangedEventHandler("Here i want to get the Method from the MethodInfo"); break; ----------------------------------------------------------------------
could this work, and what can i do. Thanks a lot Arnold
|