Ejemplo n.º 1
0
        public void PooledObjectReturnerDoubleDisposeTest()
        {
            var poolMock       = new ObjectPoolMock();
            var pooledObject   = new object();
            var objectReturner = new PooledObjectReturner <object>(poolMock, pooledObject);

            objectReturner.Dispose();
            objectReturner.Dispose();

            Assert.AreSame(pooledObject, poolMock._objects.Single());
        }
Ejemplo n.º 2
0
 private void Dispose(PooledObjectReturner <object> objectReturner) // Copy by value
 {
     objectReturner.Dispose();
 }