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