public static void RegisterComponents() { var container = UnityConfigContainer.Register(); var resolver = new UnityDependencyResolver(container); DomainEvents.Container = new DomainEventsContainer(resolver); DependencyResolver.SetResolver(resolver); }
public DomainEventsContainer(UnityDependencyResolver resolver) { _resolver = resolver; }
public System.Web.Mvc.IDependencyResolver CreateMvcResolver() { var resolver = new UnityDependencyResolver(_container); _container.RegisterInstance<System.Web.Mvc.IDependencyResolver>(resolver); return resolver; }
public void Init(HttpApplication context) { context.EndRequest += (sender, e) => UnityDependencyResolver.DisposeOfChildContainer(); }