I have 2 third-party providers, both do a similar function(this could be logging, messaging, etc), and both have events that the client must subscribe to.
I want to know what design patterns or methods I need so that I could swap out one with the other without changing any code. My main concern is how to abstract the events. One provider will have certain events that needs wiring up to handlers with certain signatures, and the other will have its own.
Should I have some kind of dictionary of delegates that is exposed via a field on the interface?
I use C#.