public void RegistClassType(string className, IPoolableFactory factory) { if (this.m_data.ContainsKey(className)) { throw new ClassExistsException(className); } this.m_data.Add(className, factory); }
public PoolExpander(List <Poolable <T> > pooledObjects, int expandAmount, int instantiatedPerFrame, IPoolableFactory <T> poolableFactory) { Assert.IsNotNull(pooledObjects); Assert.IsTrue(expandAmount > 0); Assert.IsTrue(instantiatedPerFrame > 0); Assert.IsNotNull(poolableFactory); this.pooledObjects = pooledObjects; this.expandAmount = expandAmount; this.instantiatedPerFrame = instantiatedPerFrame; this.poolableFactory = poolableFactory; }
public void RegistClassType(string className, IPoolableFactory factory) { if (this.m_data.ContainsKey(className)) throw new ClassExistsException(className); this.m_data.Add(className, factory); }