public void RegisterType <TImplementation>(IocReuse reuse) where TImplementation : class { if (reuse == IocReuse.Singleton) { this.serviceCollection.AddSingleton <TImplementation>(); } }
public void RegisterType <TImplementation>(IocReuse reuse) where TImplementation : class { switch (reuse) { case IocReuse.Singleton: this.Container.Register <TImplementation>(Reuse.Singleton); break; default: this.Container.Register <TImplementation>(); break; } }