170 references to Throw
Microsoft.AspNetCore.Diagnostics.Middleware (42)
Buffering\IncomingRequestLogBuffer.cs (1)
62
Throw
.InvalidOperationException(
Buffering\PerIncomingRequestLoggingBuilderExtensions.cs (5)
35
_ =
Throw
.IfNull(builder);
36
_ =
Throw
.IfNull(configuration);
64
_ =
Throw
.IfNull(builder);
65
_ =
Throw
.IfNull(configure);
93
_ =
Throw
.IfNull(builder);
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\HttpLatencyTelemetryServiceCollectionExtensions.cs (1)
31
_ =
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)
26
=>
Throw
.IfNull(services)
38
_ =
Throw
.IfNull(services);
55
=>
Throw
.IfNull(services)
56
.Configure(
Throw
.IfNull(configure))
67
=>
Throw
.IfNull(services)
68
.Configure<RequestLatencyTelemetryOptions>(
Throw
.IfNull(section))
Logging\HttpLoggingServiceCollectionExtensions.cs (4)
38
_ =
Throw
.IfNull(services);
64
_ =
Throw
.IfNull(services);
65
_ =
Throw
.IfNull(section);
83
_ =
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);
64
_ =
Throw
.IfNull(section);
83
_ =
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);
63
_ =
Throw
.IfNull(services);
64
_ =
Throw
.IfNull(section);
85
_ =
Throw
.IfNull(services);
86
_ =
Throw
.IfNull(configure);
103
=>
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 (85)
Buffering\GlobalBuffer.cs (4)
49
_options =
Throw
.IfNull(options);
52
_category =
Throw
.IfNullOrEmpty(category);
53
_ruleSelector =
Throw
.IfNull(ruleSelector);
83
Throw
.InvalidOperationException(
Buffering\GlobalBufferLoggingBuilderExtensions.cs (5)
32
_ =
Throw
.IfNull(builder);
33
_ =
Throw
.IfNull(configuration);
58
_ =
Throw
.IfNull(builder);
59
_ =
Throw
.IfNull(configure);
81
_ =
Throw
.IfNull(builder);
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)
217
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));
141
_ =
Throw
.IfNull(categoryName);
165
_ =
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\RandomProbabilisticSampler.cs (2)
40
_ruleSelector =
Throw
.IfNull(ruleSelector);
41
LastKnownGoodSamplerRules =
Throw
.IfNullOrMemberNull(options, options.CurrentValue).Rules.ToArray();
Sampling\SamplingLoggerBuilderExtensions.cs (10)
30
_ =
Throw
.IfNull(builder);
48
_ =
Throw
.IfNull(builder);
49
_ =
Throw
.IfNull(configuration);
79
_ =
Throw
.IfNull(builder);
80
_ =
Throw
.IfNull(configure);
106
_ =
Throw
.IfNull(builder);
107
_ =
Throw
.IfOutOfRange(probability, 0, 1, nameof(probability));
128
_ =
Throw
.IfNull(builder);
145
_ =
Throw
.IfNull(builder);
146
_ =
Throw
.IfNull(sampler);
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);