PIbd-21. Rodionov I.A. Lab work 08 #12

Closed
ILRodionov wants to merge 4 commits from lab8_base into lab7_base
Showing only changes of commit 58cd87220a - Show all commits

View File

@ -19,7 +19,7 @@ namespace IceCreamShopContracts.DI
_container.AddExtension(new LoggingExtension(factory));
}
void IDependencyContainer.RegisterType<T, U>(bool isSingle)
public void RegisterType<T, U>(bool isSingle) where U : class, T where T : class
{
_container.RegisterType<T, U>(isSingle ? TypeLifetime.Singleton : TypeLifetime.Transient);
}