190 references to Throw
Microsoft.AspNetCore.Diagnostics.Middleware (43)
Buffering\IncomingRequestLogBuffer.cs (1)
62
Throw
.InvalidOperationException(
Buffering\PerIncomingRequestLoggingBuilderExtensions.cs (6)
37
_ =
Throw
.IfNull(builder);
38
_ =
Throw
.IfNull(configuration);
66
_ =
Throw
.IfNull(builder);
67
_ =
Throw
.IfNull(configure);
99
_ =
Throw
.IfNull(builder);
119
Throw
.InvalidOperationException(
Latency\AddServerTimingHeaderMiddleware.cs (1)
23
_next =
Throw
.IfNull(next);
Latency\CapturePipelineEntryMiddleware.cs (1)
23
_next =
Throw
.IfNull(next);
Latency\CapturePipelineExitMiddleware.cs (1)
26
_next =
Throw
.IfNull(next);
Latency\CaptureResponseTimeMiddleware.cs (1)
26
_next =
Throw
.IfNull(next);
Latency\HttpLoggingServiceCollectionExtensions.cs (1)
27
_ =
Throw
.IfNull(services);
Latency\RequestLatencyTelemetryApplicationBuilderExtensions.cs (2)
22
=>
Throw
.IfNull(builder)
34
=>
Throw
.IfNull(builder)
Latency\RequestLatencyTelemetryMiddleware.cs (1)
44
_next =
Throw
.IfNull(next);
Latency\RequestLatencyTelemetryServiceCollectionExtensions.cs (6)
27
_ =
Throw
.IfNull(services);
45
_ =
Throw
.IfNull(services);
63
=>
Throw
.IfNull(services)
64
.Configure(
Throw
.IfNull(configure))
75
=>
Throw
.IfNull(services)
76
.Configure<RequestLatencyTelemetryOptions>(
Throw
.IfNull(section))
Logging\HttpLoggingServiceCollectionExtensions.cs (4)
38
_ =
Throw
.IfNull(services);
65
_ =
Throw
.IfNull(services);
66
_ =
Throw
.IfNull(section);
84
_ =
Throw
.IfNull(services);
Logging\HttpUtilityExtensions.cs (1)
38
_ =
Throw
.IfNull(request);
Logging\Internal\LoggingRedactionOptionsConfigureOptions.cs (1)
31
_section =
Throw
.IfNull(section);
Logging\RequestHeadersEnricherServiceCollectionExtensions.cs (3)
23
_ =
Throw
.IfNull(services);
39
_ =
Throw
.IfNull(services);
40
_ =
Throw
.IfNull(configure);
Logging\RequestHeadersLogEnricher.cs (2)
35
var opt =
Throw
.IfMemberNull(options, options.Value);
43
_redactorProvider =
Throw
.IfNull(redactorProvider);
src\Shared\BufferWriterPool\BufferWriter.cs (4)
74
_ =
Throw
.IfLessThan(value, 0);
121
_ =
Throw
.IfOutOfRange(count, 0, _buffer.Length - WrittenCount);
182
Throw
.InvalidOperationException("Exceeded array capacity");
189
_ =
Throw
.IfLessThan(sizeHint, 0);
src\Shared\BufferWriterPool\BufferWriterPool.cs (2)
28
_ =
Throw
.IfLessThan(maxCapacity, 1);
29
_ =
Throw
.IfLessThan(maxBufferWriterCapacity, 1);
src\Shared\BufferWriterPool\BufferWriterPooledObjectPolicy.cs (2)
37
MaximumRetainedCapacity =
Throw
.IfLessThan(maximumRetainedCapacity, 1);
63
_ =
Throw
.IfNull(obj);
src\Shared\Debugger\DebuggerExtensions.cs (3)
27
_ =
Throw
.IfNull(services);
41
_ =
Throw
.IfNull(services);
55
_ =
Throw
.IfNull(services);
Microsoft.Extensions.Http.Diagnostics (43)
Http\HttpDependencyMetadataResolver.cs (1)
46
_ =
Throw
.IfNull(dependencyMetadata);
Http\HttpDiagnosticsHttpRequestMessageExtensions.cs (3)
24
_ =
Throw
.IfNull(request);
25
_ =
Throw
.IfNull(metadata);
41
_ =
Throw
.IfNull(request);
Http\HttpDiagnosticsHttpWebRequestExtensions.cs (3)
21
_ =
Throw
.IfNull(request);
22
_ =
Throw
.IfNull(metadata);
36
_ =
Throw
.IfNull(request);
Http\HttpDiagnosticsServiceCollectionExtensions.cs (2)
24
_ =
Throw
.IfNull(services);
40
_ =
Throw
.IfNull(services);
Latency\HttpClientLatencyTelemetryExtensions.cs (3)
29
_ =
Throw
.IfNull(services);
65
_ =
Throw
.IfNull(section);
84
_ =
Throw
.IfNull(configure);
Logging\HttpClientLoggingHttpClientBuilderExtensions.cs (10)
36
_ =
Throw
.IfNull(builder);
58
_ =
Throw
.IfNull(builder);
76
_ =
Throw
.IfNull(builder);
77
_ =
Throw
.IfNull(section);
100
_ =
Throw
.IfNull(builder);
101
_ =
Throw
.IfNull(section);
119
_ =
Throw
.IfNull(builder);
120
_ =
Throw
.IfNull(configure);
143
_ =
Throw
.IfNull(builder);
144
_ =
Throw
.IfNull(configure);
Logging\HttpClientLoggingServiceCollectionExtensions.cs (6)
33
_ =
Throw
.IfNull(services);
64
_ =
Throw
.IfNull(services);
65
_ =
Throw
.IfNull(section);
86
_ =
Throw
.IfNull(services);
87
_ =
Throw
.IfNull(configure);
104
=>
Throw
.IfNull(services).AddActivatedSingleton<IHttpClientLogEnricher, T>();
Logging\Internal\HttpRequestReader.cs (1)
73
_outgoingPathLogMode =
Throw
.IfOutOfRange(options.RequestPathLoggingMode);
Logging\Internal\HttpResponseBodyReader.cs (1)
35
_ =
Throw
.IfNull(responseOptions);
Logging\Internal\LoggingOptionsConfigureOptions.cs (1)
32
_section =
Throw
.IfNull(section);
Logging\Internal\TelemetryCommonHttpExtensions.cs (1)
15
_ =
Throw
.IfNull(services);
src\Shared\BufferWriterPool\BufferWriter.cs (4)
74
_ =
Throw
.IfLessThan(value, 0);
121
_ =
Throw
.IfOutOfRange(count, 0, _buffer.Length - WrittenCount);
182
Throw
.InvalidOperationException("Exceeded array capacity");
189
_ =
Throw
.IfLessThan(sizeHint, 0);
src\Shared\BufferWriterPool\BufferWriterPool.cs (2)
28
_ =
Throw
.IfLessThan(maxCapacity, 1);
29
_ =
Throw
.IfLessThan(maxBufferWriterCapacity, 1);
src\Shared\BufferWriterPool\BufferWriterPooledObjectPolicy.cs (2)
37
MaximumRetainedCapacity =
Throw
.IfLessThan(maximumRetainedCapacity, 1);
63
_ =
Throw
.IfNull(obj);
src\Shared\Debugger\DebuggerExtensions.cs (3)
27
_ =
Throw
.IfNull(services);
41
_ =
Throw
.IfNull(services);
55
_ =
Throw
.IfNull(services);
Microsoft.Extensions.Telemetry (104)
Buffering\GlobalBuffer.cs (3)
50
_options =
Throw
.IfNull(options);
54
_category =
Throw
.IfNullOrEmpty(category);
84
Throw
.InvalidOperationException(
Buffering\GlobalBufferLoggingBuilderExtensions.cs (6)
34
_ =
Throw
.IfNull(builder);
35
_ =
Throw
.IfNull(configuration);
60
_ =
Throw
.IfNull(builder);
61
_ =
Throw
.IfNull(configure);
83
_ =
Throw
.IfNull(builder);
98
Throw
.InvalidOperationException(
Enrichment\ApplicationEnricherServiceCollectionExtensions.cs (5)
66
_ =
Throw
.IfNull(services);
81
_ =
Throw
.IfNull(services);
82
_ =
Throw
.IfNull(configure);
98
_ =
Throw
.IfNull(services);
99
_ =
Throw
.IfNull(section);
Enrichment\ApplicationLogEnricher.cs (2)
19
var enricherOptions =
Throw
.IfMemberNull(options, options.Value);
20
var applicationMetadata =
Throw
.IfMemberNull(metadata, metadata.Value);
Enrichment\ProcessEnricherServiceCollectionExtensions.cs (5)
24
_ =
Throw
.IfNull(services);
39
_ =
Throw
.IfNull(services);
40
_ =
Throw
.IfNull(configure);
57
_ =
Throw
.IfNull(services);
58
_ =
Throw
.IfNull(section);
Enrichment\ProcessLogEnricher.cs (1)
22
var enricherOptions =
Throw
.IfMemberNull(options, options.Value);
Enrichment\StaticProcessLogEnricher.cs (1)
20
var enricherOptions =
Throw
.IfMemberNull(options, options.Value);
Http\HttpRouteParser.cs (1)
273
Throw
.ArgumentException(nameof(httpRoute), "A catch-all parameter must be the last segment in the route.");
Http\ParsedRouteSegments.cs (1)
22
_ =
Throw
.IfNull(segments);
Latency\Internal\LatencyContextRegistrySet.cs (2)
50
_ =
Throw
.IfNull(names);
56
Throw
.ArgumentException(nameof(names), "Found null or whitespace name in supplied set");
Latency\Internal\LatencyContextTokenIssuer.cs (3)
25
_ =
Throw
.IfNull(name);
31
_ =
Throw
.IfNull(name);
37
_ =
Throw
.IfNull(name);
Latency\Internal\Registry.cs (3)
38
Throw
.ArgumentException(nameof(keys), "Supplied set contains null values");
66
_ =
Throw
.IfNull(key);
74
Throw
.ArgumentException(nameof(key), $"Name {key} has not been registered.");
Latency\LatencyConsoleExtensions.cs (5)
26
_ =
Throw
.IfNull(services);
43
_ =
Throw
.IfNull(services);
44
_ =
Throw
.IfNull(configure);
60
_ =
Throw
.IfNull(services);
61
_ =
Throw
.IfNull(section);
Latency\LatencyContextExtensions.cs (5)
25
_ =
Throw
.IfNull(services);
42
_ =
Throw
.IfNull(services);
43
_ =
Throw
.IfNull(configure);
58
_ =
Throw
.IfNull(services);
59
_ =
Throw
.IfNull(section);
Logging\ExtendedLoggerFactory.cs (3)
71
Throw
.ArgumentException($"{_factoryOptions.ActivityTrackingOptions} is invalid ActivityTrackingOptions value.", nameof(factoryOptions));
148
_ =
Throw
.IfNull(categoryName);
172
_ =
Throw
.IfNull(provider);
Logging\Import\LoggerFactoryScopeProvider.cs (1)
191
Throw
.ArgumentOutOfRangeException(nameof(index));
Logging\LoggingEnrichmentExtensions.cs (5)
34
_ =
Throw
.IfNull(builder);
35
_ =
Throw
.IfNull(configure);
53
_ =
Throw
.IfNull(builder);
54
_ =
Throw
.IfNull(section);
70
_ =
Throw
.IfNull(services);
Logging\LoggingRedactionExtensions.cs (4)
33
_ =
Throw
.IfNull(builder);
34
_ =
Throw
.IfNull(configure);
51
_ =
Throw
.IfNull(builder);
52
_ =
Throw
.IfNull(section);
Sampling\BottomKLogBuffer.cs (5)
43
_ =
Throw
.IfNull(options);
44
_timeProvider =
Throw
.IfNull(timeProvider);
45
_currentPolicy = new BottomKLogSamplingPolicy(
Throw
.IfMemberNull(options, options.CurrentValue));
51
: this(new FixedOptionsMonitor(
Throw
.IfNull(config)), timeProvider)
122
Throw
.InvalidOperationException(
Sampling\BottomKLoggingSampler.cs (1)
23
_buffer =
Throw
.IfNull(buffer);
Sampling\BottomKSampler.cs (5)
96
_reservoirCapacity =
Throw
.IfLessThan(reservoirCapacity, 1);
97
_preserveCapacity =
Throw
.IfLessThan(preserveCapacity, 0);
98
_minPeriodCount =
Throw
.IfLessThan(minPeriodCount, 0);
192
Throw
.ArgumentException(nameof(admission), "Insert must not be called for a Skip admission.");
203
_ =
Throw
.IfNull(output);
Sampling\BottomKSamplingLoggingBuilderExtensions.cs (7)
34
_ =
Throw
.IfNull(builder);
58
_ =
Throw
.IfNull(builder);
59
_ =
Throw
.IfNull(configure);
77
_ =
Throw
.IfNull(builder);
78
_ =
Throw
.IfNull(section);
117
Throw
.InvalidOperationException(
124
Throw
.InvalidOperationException(
Sampling\RandomProbabilisticSampler.cs (2)
40
_ruleSelector =
Throw
.IfNull(ruleSelector);
41
LastKnownGoodSamplerRules =
Throw
.IfNullOrMemberNull(options, options.CurrentValue).Rules.ToArray();
Sampling\SamplingLoggerBuilderExtensions.cs (11)
33
_ =
Throw
.IfNull(builder);
51
_ =
Throw
.IfNull(builder);
52
_ =
Throw
.IfNull(configuration);
85
_ =
Throw
.IfNull(builder);
86
_ =
Throw
.IfNull(configure);
115
_ =
Throw
.IfNull(builder);
116
_ =
Throw
.IfOutOfRange(probability, 0, 1, nameof(probability));
140
_ =
Throw
.IfNull(builder);
160
_ =
Throw
.IfNull(builder);
161
_ =
Throw
.IfNull(sampler);
183
Throw
.InvalidOperationException(
src\Shared\Data.Validation\TimeSpanAttribute.cs (3)
88
_ =
Throw
.IfNullOrWhitespace(min);
101
_ =
Throw
.IfNullOrWhitespace(min);
102
_ =
Throw
.IfNullOrWhitespace(max);
src\Shared\Memoization\MemoizedFunction.cs (2)
68
_function =
Throw
.IfNull(function);
141
_function =
Throw
.IfNull(function);
src\Shared\Pools\PoolFactory.cs (12)
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);
134
_ =
Throw
.IfLessThan(maxCapacity, 1);
135
_ =
Throw
.IfLessThan(listCapacity, 0);
155
_ =
Throw
.IfLessThan(maxCapacity, 1);
174
_ =
Throw
.IfLessThan(maxCapacity, 1);
196
_ =
Throw
.IfLessThan(maxCapacity, 1);