I created a class (observer) that will perform some actions based on certain events in other classes (publishers). The observer and publishers all within one dll.
I could create another class in the assembly and require that client applications call something like BootStrapper.Configure() before using other classes; however, I'd like to avoid needing to update all the client applications at the same time.
I could create a base class for the publisher classes and call BootStrapper.Configure() from there; however, the publishers currently inherit different base classes. I'd like to avoid refactoring those classes for now.
What I would really like to do is ensure that the "observer" class is instantiated when the client application is started, or the first time any class in the dll is referenced.
What is the best way to ensure the "observer" class will be instantiated before any "publishers" publish an event?
Sample Project: https://www.box.com/s/0ihvp11kd7bfb6mqlnmc I would like to make any method in BootStapper.cs execute when LogicLibrary is loaded.