示例#1
0
        protected virtual void InitializeContainer(IWindsorContainer container)
        {
            container.AddFacility <TypedFactoryFacility>();
            container.AddFacility <DatabaseConnectionStringProviderFacility>();
            container.AddFacility <ChainOfResponsibilityFacility>();
            container.AddSupportForEmptyCollections();

            // Web API Dependency Injection
            container.Register(
                Component.For <IDependencyResolver>()
                .Instance(new WindsorDependencyResolver(Container))
                );
        }