26 instantiations of HttpRetryBudgetOptions
Microsoft.Extensions.Http.Resilience (2)
Polly\HttpRetryResiliencePipelineBuilderExtensions.cs (1)
45return AddBudgetedRetry(builder, options, options.RetryBudget ?? new HttpRetryBudgetOptions());
Polly\HttpRetryStrategyOptionsExtensions.cs (1)
41options.RetryBudget = new HttpRetryBudgetOptions();
Microsoft.Extensions.Http.Resilience.Tests (24)
Polly\HttpRetryBudgetOptionsTests.cs (3)
16var options = new HttpRetryBudgetOptions(); 32new HttpRetryBudgetOptionsValidator().Validate(null, new HttpRetryBudgetOptions()).Succeeded.Should().BeTrue(); 48var options = new HttpRetryBudgetOptions
Polly\HttpRetryResiliencePipelineBuilderExtensionsTests.cs (16)
46retry.RetryBudget.Should().BeEquivalentTo(new HttpRetryBudgetOptions()); 65var options = new HttpRetryStrategyOptions { Name = "my-retry", RetryBudget = new() }; 79var options = new HttpRetryStrategyOptions { RetryBudget = new() }; 90var options = new HttpRetryStrategyOptions { Name = "my-retry", RetryBudget = new() { RetryRatio = 2 } }; 118options.RetryBudget = new(); 155RetryBudget = new(), 189var copy = HttpRetryResiliencePipelineBuilderExtensions.CreateBudgetedCopy(options, new HttpRetryBudgetOptions()); 198var pipeline = CreatePipeline(new() { RetryRatio = 0.5, MinimumThroughput = 1 }); 215var pipeline = CreatePipeline(new() { RetryRatio = 0.1, MinimumThroughput = 100 }); 226var pipeline = CreatePipeline(new() { RetryRatio = 0 }); 237var pipeline = CreatePipeline(new() { RetryRatio = 1, MinimumThroughput = 1 }, maxRetryAttempts: 1); 249var pipeline = CreatePipeline(new() { RetryRatio = 0.5, MinimumThroughput = 1 }); 268new() { RetryRatio = 0.5, MinimumThroughput = 1 }, 283var outer = CreatePipeline(new() { RetryRatio = 0 }); 289RetryBudget = new() { MinimumThroughput = 1000 }, 310var pipeline = CreatePipeline(new() { RetryRatio = 0.5, MinimumThroughput = 4 }, maxRetryAttempts: 1);
Polly\HttpRetryStrategyOptionsExtensionsTests.cs (2)
127RetryBudget = new HttpRetryBudgetOptions { RetryRatio = 0.5 }, 135Assert.Equal(new HttpRetryBudgetOptions().RetryRatio, options.RetryBudget!.RetryRatio);
Resilience\HttpClientBuilderExtensionsTests.RetryBudget.cs (3)
39options.Retry.RetryBudget.Should().BeEquivalentTo(new HttpRetryBudgetOptions()); 115retry.RetryBudget.Should().BeEquivalentTo(new HttpRetryBudgetOptions()); 141builder.AddStandardResilienceHandler(o => o.Retry.RetryBudget = new() { MinimumThroughput = 0 });
13 references to HttpRetryBudgetOptions
Microsoft.Extensions.Http.Resilience (8)
Internal\HttpRetryBudgetOptionsValidator.cs (1)
9internal sealed partial class HttpRetryBudgetOptionsValidator : IValidateOptions<HttpRetryBudgetOptions>
Polly\HttpRetryResiliencePipelineBuilderExtensions.cs (4)
35/// <see langword="null"/>, a budget with default <see cref="HttpRetryBudgetOptions"/> values is used, without modifying 37/// are used as is. See <see cref="HttpRetryBudgetOptions"/> for more details. 58internal static HttpRetryStrategyOptions CreateBudgetedCopy(HttpRetryStrategyOptions options, HttpRetryBudgetOptions budgetOptions) 89HttpRetryBudgetOptions budgetOptions)
Polly\HttpRetryStrategyOptions.cs (2)
83/// See <see cref="HttpRetryBudgetOptions"/> for more details. 88public HttpRetryBudgetOptions? RetryBudget { get; set; }
Polly\HttpRetryStrategyOptionsExtensions.cs (1)
30/// This method sets <see cref="HttpRetryStrategyOptions.RetryBudget"/> to a new <see cref="HttpRetryBudgetOptions"/> instance
Microsoft.Extensions.Http.Resilience.Tests (5)
Polly\HttpRetryBudgetOptionsTests.cs (2)
16var options = new HttpRetryBudgetOptions(); 48var options = new HttpRetryBudgetOptions
Polly\HttpRetryResiliencePipelineBuilderExtensionsTests.cs (1)
338HttpRetryBudgetOptions budget,
Resilience\HttpClientBuilderExtensionsTests.RetryBudget.cs (2)
94var budget = GetStandardOptions(builder.Services).Retry.RetryBudget!; 130var budget = GetStandardOptions(builder.Services).Retry.RetryBudget!;