Good morning, I would like to get a singleton in Unity, this singleton needs to be entered so that the methods RegisterInstancethemselves do not. The only thing I can think of is to have something like this in the configuration module:
container.RegisterType<Singletion, Singletion>(new ContainerControlledLigetimeManager());
container.Resolve<Singletion>();
but this seam indulges me a little.
source
share