PIbd-21. Anisin R.S. Lab work 08 #13

Closed
RuslanAnisin wants to merge 2 commits from lab8 into lab7
Showing only changes of commit 9ca13f5fea - Show all commits

View File

@ -19,7 +19,7 @@ namespace CarRepairShopContracts.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);
}