1 instantiation of Foo
Shared.Tests (1)
Pools\PoolTests.cs (1)
39return new Foo();
19 references to Foo
Shared.Tests (19)
Pools\PoolTests.cs (19)
35private class FooPolicy : IPooledObjectPolicy<Foo> 37public Foo Create() 42public bool Return(Foo obj) 60var pool = PoolFactory.CreatePool<Foo>(Capacity); 61var set = new HashSet<Foo>(); 68foreach (var f in set) 92var pool = PoolFactory.CreateResettingPool<Foo>(); 105var pool = PoolFactory.CreatePool<Foo>(new FooPolicy()); 223Assert.Throws<ArgumentOutOfRangeException>(() => PoolFactory.CreatePool<Foo>(0)); 225Assert.Throws<ArgumentNullException>(() => PoolFactory.CreatePool<Foo>(null!, 0)); 226Assert.Throws<ArgumentOutOfRangeException>(() => PoolFactory.CreatePool<Foo>(new FooPolicy(), 0)); 228Assert.Throws<ArgumentOutOfRangeException>(() => PoolFactory.CreateResettingPool<Foo>(0)); 241var pool = PoolFactory.CreatePool<Foo>(maxCapacity: Capacity); 251var uniques = new HashSet<Foo>(); 264static void FunWithPools(ObjectPool<Foo> pool, int seed) 268var objects = new HashSet<Foo>(); 274var o = pool.Get(); 286foreach (var o in objects) 303foreach (var o in objects)