示例#1
0
        public void Install(IWindsorContainer container, IConfigurationStore store)
        {
            container.AddServiceLocator();

            if (!container.Kernel.HasComponent(typeof(IMiddlewareFactory)))
            {
                container.Register(Component.For <IMiddlewareFactory>().ImplementedBy <MiddlewareFactory>().Named(typeof(MiddlewareFactory).FullName).LifestyleSingleton());
            }

            if (!container.Kernel.HasComponent(typeof(IPipelineBuilder)))
            {
                container.Register(Component.For <IPipelineBuilder>().ImplementedBy <PipelineBuilder>().Named(typeof(PipelineBuilder).FullName).LifestyleSingleton());
            }

            if (!container.Kernel.HasComponent(typeof(IPipeline)))
            {
                container.Register(Component.For <IPipeline>().ImplementedBy <Pipeline>().Named(typeof(Pipeline).FullName).LifestyleSingleton());
            }

            if (_action != null)
            {
                _action(new ChainOfResponsabilityBuilder(container));
            }
        }