1 instantiation of WeightedGroupsRoutingStrategy
Microsoft.Extensions.Http.Resilience (1)
Routing\Internal\WeightedGroups\WeightedGroupsRoutingStrategyFactory.cs (1)
32
WeightedGroupsRoutingStrategy IPooledObjectPolicy<WeightedGroupsRoutingStrategy>.Create() =>
new
(_randomizer, _pool);
10 references to WeightedGroupsRoutingStrategy
Microsoft.Extensions.Http.Resilience (10)
Routing\Internal\WeightedGroups\WeightedGroupsRoutingStrategy.cs (2)
16
private readonly ObjectPool<
WeightedGroupsRoutingStrategy
> _pool;
21
public WeightedGroupsRoutingStrategy(Randomizer randomizer, ObjectPool<
WeightedGroupsRoutingStrategy
> pool)
Routing\Internal\WeightedGroups\WeightedGroupsRoutingStrategyFactory.cs (8)
10
internal sealed class WeightedGroupsRoutingStrategyFactory : IPooledObjectPolicy<
WeightedGroupsRoutingStrategy
>
14
private readonly ObjectPool<
WeightedGroupsRoutingStrategy
> _pool;
25
public
WeightedGroupsRoutingStrategy
Get()
27
var
strategy = _pool.Get();
32
WeightedGroupsRoutingStrategy
IPooledObjectPolicy<
WeightedGroupsRoutingStrategy
>.Create() => new(_randomizer, _pool);
34
bool IPooledObjectPolicy<
WeightedGroupsRoutingStrategy
>.Return(
WeightedGroupsRoutingStrategy
obj) => obj.TryReset();