12 references to Randomizer
Microsoft.Extensions.Http.Resilience (12)
Hedging\ResilienceHttpClientBuilderExtensions.Hedging.cs (1)
78
builder.Services.TryAddSingleton<
Randomizer
>();
Routing\Internal\OrderedGroups\OrderedGroupsRoutingStrategy.cs (1)
19
public OrderedGroupsRoutingStrategy(
Randomizer
randomizer, ObjectPool<OrderedGroupsRoutingStrategy> pool)
Routing\Internal\OrderedGroups\OrderedGroupsRoutingStrategyFactory.cs (2)
12
private readonly
Randomizer
_randomizer;
16
public OrderedGroupsRoutingStrategyFactory(
Randomizer
randomizer, NamedOptionsCache<OrderedGroupsRoutingOptions> cache)
Routing\Internal\RequestRoutingStrategy.cs (2)
17
protected RequestRoutingStrategy(
Randomizer
randomizer)
22
public
Randomizer
Randomizer { get; }
Routing\Internal\RoutingHelper.cs (1)
12
public static T SelectByWeight<T>(this IList<T> endpoints, Func<T, double> weightProvider,
Randomizer
randomizer)
Routing\Internal\WeightedGroups\WeightedGroupsRoutingStrategy.cs (1)
21
public WeightedGroupsRoutingStrategy(
Randomizer
randomizer, ObjectPool<WeightedGroupsRoutingStrategy> pool)
Routing\Internal\WeightedGroups\WeightedGroupsRoutingStrategyFactory.cs (2)
12
private readonly
Randomizer
_randomizer;
16
public WeightedGroupsRoutingStrategyFactory(
Randomizer
randomizer, NamedOptionsCache<WeightedGroupsRoutingOptions> cache)
Routing\RoutingStrategyBuilderExtensions.cs (2)
131
var factory = new OrderedGroupsRoutingStrategyFactory(serviceProvider.GetRequiredService<
Randomizer
>(), optionsCache);
143
var factory = new WeightedGroupsRoutingStrategyFactory(serviceProvider.GetRequiredService<
Randomizer
>(), optionsCache);