G
Guest
Good Day All,
I have an application that processes several tasks. Depending upon the task
it instantiates the appropriate object to do the actual work. Since I wanted
the application to be extensible the processing objects all implement a given
interface. That way the process can load them dynamically at run time using
the Factory design pattern and adding new processing is as simple as
deploying the new worker assembly and updating the application's config file.
Here is my issue. I want each of the objects that implements the interface
to also implement an EventHandler for an Event on the main application. The
only way that I can see this as being guaranteed is by delcaring the
EventHandler in the interface. However, I can't figure out how to do it or if
I can. I know I can declare an Event in the interface but I am not sure how I
declare and EventHandler. Does anyone know if/how this can be done?
Thanks for the help!
I have an application that processes several tasks. Depending upon the task
it instantiates the appropriate object to do the actual work. Since I wanted
the application to be extensible the processing objects all implement a given
interface. That way the process can load them dynamically at run time using
the Factory design pattern and adding new processing is as simple as
deploying the new worker assembly and updating the application's config file.
Here is my issue. I want each of the objects that implements the interface
to also implement an EventHandler for an Event on the main application. The
only way that I can see this as being guaranteed is by delcaring the
EventHandler in the interface. However, I can't figure out how to do it or if
I can. I know I can declare an Event in the interface but I am not sure how I
declare and EventHandler. Does anyone know if/how this can be done?
Thanks for the help!