using ModuleTools.Interfaces;
using Unity;
using Unity.Lifetime;
namespace ModuleTools.BusinessLogics
{
///
/// Работа с UnityContainer
///
public class UnityContainerManager : IDependencyManager
{
private readonly IUnityContainer _unityContainer;
public UnityContainerManager() => _unityContainer = new UnityContainer();
public void RegisterType() where U : T => _unityContainer.RegisterType(new HierarchicalLifetimeManager());
public void RegisterType() => _unityContainer.RegisterType(new HierarchicalLifetimeManager());
public T Resolve() => _unityContainer.Resolve();
}
}