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