Castle.MicroKernel.Lifestyle.PoolableLifestyleManager.CreatePool C# (CSharp) Method

CreatePool() protected method

protected CreatePool ( int initialSize, int maxSize ) : IPool
initialSize int
maxSize int
return IPool
		protected IPool CreatePool(int initialSize, int maxSize)
		{
			if (!Kernel.HasComponent(typeof(IPoolFactory)))
			{
				Kernel.Register(
					Component.For<IPoolFactory>()
						.ImplementedBy<DefaultPoolFactory>()
						.NamedAutomatically("castle.internal-pool-factory"));
			}

			var factory = Kernel.Resolve<IPoolFactory>();
			return factory.Create(initialSize, maxSize, ComponentActivator);
		}