Exemplo n.º 1
0
        public static IWindsorContainer Build(string configPath)
        {
            var container = new WindsorContainer();

            container.Kernel.AddHandlerSelector(new SessionManagerHandlerSelector());

            container.Kernel.ComponentRegistered += Kernel_ComponentRegistered;

            container.RegisterFacilities()
                .RegisterControllers()
                .RegisterNhibernateRepository()
                .RegisterModelServiceComponents()
                .RegisterPrintServiceComponents()
                .RegisterFilters()
                .RegisterRepositoryPatternComponents()
                .RegisterMvcDelegatesComponents()
                .RegisterSecurityComponents();

            return container;
        }