コード例 #1
0
ファイル: UnityConfig.cs プロジェクト: rafaeltomitao/collhub
        public static void RegisterComponents()
        {
            var container = UnityConfigContainer.Register();
            var resolver = new UnityDependencyResolver(container);

            DomainEvents.Container = new DomainEventsContainer(resolver);

            DependencyResolver.SetResolver(resolver);
        }
コード例 #2
0
 public DomainEventsContainer(UnityDependencyResolver resolver)
 {
     _resolver = resolver;
 }
コード例 #3
0
 public System.Web.Mvc.IDependencyResolver CreateMvcResolver()
 {
     var resolver = new UnityDependencyResolver(_container);
     _container.RegisterInstance<System.Web.Mvc.IDependencyResolver>(resolver);
     return resolver;
 }
コード例 #4
0
 public void Init(HttpApplication context)
 {
     context.EndRequest += (sender, e) => UnityDependencyResolver.DisposeOfChildContainer();
 }