using ToolsModule.Interfaces;
using System;
using Unity;
using Unity.Lifetime;
namespace ToolsModule.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();
public object Resolve(Type t) => _unityContainer.Resolve(t);
}
}