private static void RegisterDatabaseDriver(this ContainerImpl container, Type driverType) { container.WindsorContainer.Register( Component.For(typeof(DbDriver)) .Named(driverType.FullName) .ImplementedBy(driverType) .LifestyleSingleton() ); }
/// <summary> /// Creates the default service collection. /// </summary> /// <returns></returns> public static IContainer CreateDefaultContainer(bool initialize = true) { var wrapper = new ContainerImpl(new WindsorContainer()); if (initialize) { ContainerInitializer.InitializeDefaultServices(wrapper); } return(wrapper); }