Exemplo n.º 1
0
 public void Install(IWindsorContainer container, IConfigurationStore store)
 {
     if (FacilityHelper.DoesKernelNotAlreadyContainFacility <TypedFactoryFacility>(container))
     {
         container.Kernel.AddFacility <TypedFactoryFacility>();
     }
     container.Register(Component.For <IUnitOfWork>().ImplementedBy <UnitOfWork>().IsFallback().LifestyleTransient());
     container.Register(Component.For <DbFactoryComponentSelector, ITypedFactoryComponentSelector>());
     container.Register(Component.For <IDbFactory>().AsFactory(c => c.SelectedWith <DbFactoryComponentSelector>()));
 }
 public void Install(IWindsorContainer container, IConfigurationStore store)
 {
     if (FacilityHelper.DoesKernelNotAlreadyContainFacility <TypedFactoryFacility>(container))
     {
         container.Kernel.AddFacility <TypedFactoryFacility>();
     }
     container.Register(Component.For <IDbFactory>().AsFactory().IsFallback().LifestyleSingleton());
     container.Register(Component.For <IUnitOfWork>()
                        .ImplementedBy <Dapper.Repository.UnitOfWork.Data.UnitOfWork>().IsFallback().LifestyleTransient());
 }
Exemplo n.º 3
0
 public void Install(IWindsorContainer container, IConfigurationStore store)
 {
     if (FacilityHelper.DoesKernelNotAlreadyContainFacility <TypedFactoryFacility>(container))
     {
         container.Kernel.AddFacility <TypedFactoryFacility>();
     }
     container.Register(Component.For <IHandlerFactory>().AsFactory());
     container.Register(Component.For <ICommandDispatcher>().ImplementedBy <CommandDispatcher>());
     container.Register(Component.For <IRequestDispatcher>().ImplementedBy <RequestDispatcher>());
     container.Register(Component.For <IQueryDispatcher>().ImplementedBy <QueryDispatcher>());
     container.Register(Component.For <ICqrsDispatcher>().ImplementedBy <CqrsDispatcher>());
 }