public void RegisterType <TImplementation>(IocReuse reuse)
     where TImplementation : class
 {
     if (reuse == IocReuse.Singleton)
     {
         this.serviceCollection.AddSingleton <TImplementation>();
     }
 }
Exemplo n.º 2
0
        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;
            }
        }