Skip to main content

Dependency Injection

IoC Challenge – Multiple interfaces to the same singleton instance
·509 words·3 mins
.NET ALT.NET Dependency Injection IoC Ninject StructureMap Unity
I have an IoC challenge that I am currently trying to work through. I have a series of classes that implement more than one interface, with the lifetime of the class needing to be a singleton, and I really don’t like the idea of falling back on custom instantiation code along with potentially custom lifetime management code to make this work.