Closed codemillmatt closed 7 years ago
Do you have an example? Sometimes, IoC frameworks support Func's to retrieve an instance or register an instance (and therefore a Singleton). For example, see: http://caliburnmicro.com/documentation/simple-container
Autofac can also work this way http://docs.autofac.org/en/latest/lifetime/instance-scope.html#single-instance
I've changed my mind on the public constructor 😄. You all are right, all one would need to do is register the existing singleton with the IoC & be done with it. Whether it's via a func or the singleton instance directly. (Or am I missing something?)
I think the most important thing to do would be to provide some examples of how it works w/ various IoC's Caliburn or AutoFac...
Anyway, unless @chriszirkel or @ionixjunior object, I'm going to close this issue and then create a new one for "how to use with IoC" documentation.
Closing this and will add a new issue for documentation
Should there be a public constructor so this can work with IoC frameworks? (Will probably cause a dissonance & issues with the singleton pattern approach.)