81 references to Throw
Microsoft.Extensions.Http.Resilience (81)
Hedging\HttpClientHedgingResiliencePredicates.cs (1)
49
_ =
Throw
.IfNull(exception);
Hedging\Internals\RequestMessageSnapshotStrategy.cs (1)
27
Throw
.InvalidOperationException("The HTTP request message was not found in the resilience context.");
Hedging\ResilienceHttpClientBuilderExtensions.Hedging.cs (4)
44
_ =
Throw
.IfNull(builder);
45
_ =
Throw
.IfNull(configure);
73
_ =
Throw
.IfNull(builder);
88
Throw
.InvalidOperationException("Request message snapshot is not attached to the resilience context.");
Hedging\StandardHedgingHandlerBuilderExtensions.cs (10)
30
_ =
Throw
.IfNull(builder);
31
_ =
Throw
.IfNull(section);
35
Throw
.ArgumentException(nameof(section), "Configuration section cannot be empty.");
51
_ =
Throw
.IfNull(builder);
52
_ =
Throw
.IfNull(configure);
65
_ =
Throw
.IfNull(builder);
66
_ =
Throw
.IfNull(configure);
80
_ =
Throw
.IfNull(builder);
98
_ =
Throw
.IfNull(builder);
99
_ =
Throw
.IfNull(selectorFactory);
Internal\RequestMessageSnapshot.cs (1)
78
Throw
.InvalidOperationException($"{nameof(StreamContent)} content cannot by cloned.");
Polly\HttpClientResiliencePredicates.cs (2)
48
_ =
Throw
.IfNull(exception);
65
_ =
Throw
.IfNull(response);
Resilience\HttpResilienceContextExtensions.cs (2)
31
_ =
Throw
.IfNull(context);
43
_ =
Throw
.IfNull(context);
Resilience\HttpResilienceHttpRequestMessageExtensions.cs (2)
27
_ =
Throw
.IfNull(requestMessage);
51
_ =
Throw
.IfNull(requestMessage);
Resilience\HttpResiliencePipelineBuilderExtensions.cs (3)
23
_ =
Throw
.IfNull(builder);
39
_ =
Throw
.IfNull(builder);
40
_ =
Throw
.IfNull(selectorFactory);
Resilience\HttpStandardResiliencePipelineBuilderExtensions.cs (10)
27
_ =
Throw
.IfNull(builder);
28
_ =
Throw
.IfNull(section);
32
Throw
.ArgumentException(nameof(section), "Configuration section cannot be empty.");
53
_ =
Throw
.IfNull(builder);
54
_ =
Throw
.IfNull(configure);
69
_ =
Throw
.IfNull(builder);
70
_ =
Throw
.IfNull(configure);
84
_ =
Throw
.IfNull(builder);
100
_ =
Throw
.IfNull(builder);
101
_ =
Throw
.IfNull(selectorFactory);
Resilience\ResilienceHandler.cs (4)
32
_pipelineProvider =
Throw
.IfNull(pipelineProvider);
42
_ =
Throw
.IfNull(pipeline);
55
_ =
Throw
.IfNull(request);
114
_ =
Throw
.IfNull(request);
Resilience\ResilienceHandlerContext.cs (1)
70
public void OnPipelineDisposed(Action callback) => _context.OnPipelineDisposed(
Throw
.IfNull(callback));
Resilience\ResilienceHttpClientBuilderExtensions.Resilience.cs (6)
38
_ =
Throw
.IfNull(builder);
39
_ =
Throw
.IfNullOrEmpty(pipelineName);
40
_ =
Throw
.IfNull(configure);
61
_ =
Throw
.IfNull(builder);
62
_ =
Throw
.IfNullOrEmpty(pipelineName);
63
_ =
Throw
.IfNull(configure);
Resilience\ResilienceHttpClientBuilderExtensions.StandardResilience.cs (5)
33
_ =
Throw
.IfNull(builder);
34
_ =
Throw
.IfNull(section);
51
_ =
Throw
.IfNull(builder);
52
_ =
Throw
.IfNull(configure);
68
_ =
Throw
.IfNull(builder);
Routing\Internal\OrderedGroups\OrderedGroupsRoutingStrategy.cs (1)
36
Throw
.InvalidOperationException("The routing strategy is not initialized.");
Routing\Internal\RoutingResilienceStrategy.cs (2)
34
Throw
.InvalidOperationException("The HTTP request message was not found in the resilience context.");
47
Throw
.InvalidOperationException("The routing strategy did not provide any route URL on the first attempt.");
Routing\Internal\WeightedGroups\WeightedGroupsRoutingStrategy.cs (1)
52
Throw
.InvalidOperationException("The routing strategy is not initialized.");
Routing\RoutingStrategyBuilderExtensions.cs (12)
34
_ =
Throw
.IfNull(builder);
35
_ =
Throw
.IfNull(section);
49
_ =
Throw
.IfNull(builder);
50
_ =
Throw
.IfNull(configure);
63
_ =
Throw
.IfNull(builder);
64
_ =
Throw
.IfNull(configure);
79
_ =
Throw
.IfNull(builder);
80
_ =
Throw
.IfNull(section);
95
_ =
Throw
.IfNull(builder);
96
_ =
Throw
.IfNull(configure);
109
_ =
Throw
.IfNull(builder);
110
_ =
Throw
.IfNull(configure);
src\Shared\Data.Validation\TimeSpanAttribute.cs (3)
88
_ =
Throw
.IfNullOrWhitespace(min);
101
_ =
Throw
.IfNullOrWhitespace(min);
102
_ =
Throw
.IfNullOrWhitespace(max);
src\Shared\Pools\PoolFactory.cs (10)
42
_ =
Throw
.IfLessThan(maxCapacity, 1);
57
_ =
Throw
.IfNull(policy);
58
_ =
Throw
.IfLessThan(maxCapacity, 1);
75
_ =
Throw
.IfLessThan(maxCapacity, 1);
88
_ =
Throw
.IfLessThan(maxCapacity, 1);
89
_ =
Throw
.IfLessThan(maxStringBuilderCapacity, 1);
116
_ =
Throw
.IfLessThan(maxCapacity, 1);
136
_ =
Throw
.IfLessThan(maxCapacity, 1);
155
_ =
Throw
.IfLessThan(maxCapacity, 1);
177
_ =
Throw
.IfLessThan(maxCapacity, 1);