85 references to Throw
Microsoft.Extensions.Telemetry (85)
Buffering\GlobalBuffer.cs (4)
48_options = Throw.IfNull(options); 51_category = Throw.IfNullOrEmpty(category); 52_ruleSelector = Throw.IfNull(ruleSelector); 82Throw.InvalidOperationException(
Buffering\GlobalBufferLoggingBuilderExtensions.cs (5)
35_ = Throw.IfNull(builder); 36_ = Throw.IfNull(configuration); 58_ = Throw.IfNull(builder); 59_ = Throw.IfNull(configure); 81_ = Throw.IfNull(builder);
Enrichment\ApplicationEnricherServiceCollectionExtensions.cs (5)
24_ = Throw.IfNull(services); 39_ = Throw.IfNull(services); 40_ = Throw.IfNull(configure); 56_ = Throw.IfNull(services); 57_ = Throw.IfNull(section);
Enrichment\ApplicationLogEnricher.cs (2)
20var enricherOptions = Throw.IfMemberNull(options, options.Value); 21var 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)
22var enricherOptions = Throw.IfMemberNull(options, options.Value);
Enrichment\StaticProcessLogEnricher.cs (1)
20var enricherOptions = Throw.IfMemberNull(options, options.Value);
Http\HttpRouteParser.cs (1)
218Throw.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); 56Throw.ArgumentException(nameof(names), "Found null or whitespace name in supplied set");
Latency\Internal\LatencyContextTokenIssuer.cs (3)
26_ = Throw.IfNull(name); 32_ = Throw.IfNull(name); 38_ = Throw.IfNull(name);
Latency\Internal\Registry.cs (3)
38Throw.ArgumentException(nameof(keys), "Supplied set contains null values"); 66_ = Throw.IfNull(key); 74Throw.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)
72Throw.ArgumentException($"{_factoryOptions.ActivityTrackingOptions} is invalid ActivityTrackingOptions value.", nameof(factoryOptions)); 144_ = Throw.IfNull(categoryName); 168_ = Throw.IfNull(provider);
Logging\Import\LoggerFactoryScopeProvider.cs (1)
195Throw.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); 41LastKnownGoodSamplerRules = Throw.IfNullOrMemberNull(options, options!.CurrentValue).Rules.ToArray();
Sampling\SamplingLoggerBuilderExtensions.cs (10)
32_ = Throw.IfNull(builder); 50_ = Throw.IfNull(builder); 51_ = Throw.IfNull(configuration); 81_ = Throw.IfNull(builder); 82_ = Throw.IfNull(configure); 108_ = Throw.IfNull(builder); 109_ = Throw.IfOutOfRange(probability, 0, 1, nameof(probability)); 130_ = Throw.IfNull(builder); 147_ = Throw.IfNull(builder); 148_ = 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);