Пофиксил Unity-контейнер

This commit is contained in:
Илья 2024-05-18 17:47:12 +04:00
parent 5797844543
commit 58cd87220a

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);
}