593 instantiations of ServiceCollection
Aspire.Cli.Tests (12)
Commands\RunCommandTests.cs (10)
3796using var services = new ServiceCollection() 3840using var services = new ServiceCollection() 3896using var services = new ServiceCollection() 3940using var services = new ServiceCollection() 3983using var services = new ServiceCollection() 4020using var services = new ServiceCollection() 4081using var services = new ServiceCollection() 4124using var services = new ServiceCollection() 4167using var services = new ServiceCollection() 4205using var services = new ServiceCollection()
ProgramTests.cs (1)
46var services = new ServiceCollection();
Utils\CliTestHelper.cs (1)
85var services = new ServiceCollection();
Aspire.Dashboard.Tests (6)
Model\DashboardCommandExecutorTests.cs (3)
50await startingNotification.Entry.PrimaryAction!.OnClick(new ServiceCollection().BuildServiceProvider()); 95await cancelAction.OnClick(new ServiceCollection().BuildServiceProvider()); 96await cancelAction.OnClick(new ServiceCollection().BuildServiceProvider());
Model\DashboardDataSourceTests.cs (2)
249var services = new ServiceCollection() 1317var serviceProvider = new ServiceCollection()
Telemetry\TelemetryLoggerProviderTests.cs (1)
20var serviceProvider = new ServiceCollection()
Aspire.EndToEnd.Tests (1)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
505var services = new ServiceCollection();
Aspire.Hosting.Azure.Kubernetes.Tests (4)
AzureKubernetesInfrastructureTests.cs (4)
210using var services = new ServiceCollection() 234using var services = new ServiceCollection() 616var services = new ServiceCollection() 855return new ServiceCollection()
Aspire.Hosting.Azure.Tests (6)
ProvisioningContextProviderTests.cs (6)
392Services = new ServiceCollection().BuildServiceProvider() 448Services = new ServiceCollection().BuildServiceProvider() 457Services = new ServiceCollection().BuildServiceProvider(), 544Services = new ServiceCollection().BuildServiceProvider() 553Services = new ServiceCollection().BuildServiceProvider() 747Services = new ServiceCollection().BuildServiceProvider()
Aspire.Hosting.Blazor.Tests (9)
BlazorHostedExtensionsTests.cs (2)
246using var services = new ServiceCollection().BuildServiceProvider(); 554Services = new ServiceCollection().BuildServiceProvider()
BrowserDebuggerHelperTests.cs (4)
21using var serviceProvider = new ServiceCollection() 53using var serviceProvider = new ServiceCollection() 90using var serviceProvider = new ServiceCollection() 121using var serviceProvider = new ServiceCollection()
WithBlazorAppTests.cs (3)
258Services = new ServiceCollection().BuildServiceProvider() 299Services = new ServiceCollection().BuildServiceProvider() 318using var services = new ServiceCollection().BuildServiceProvider();
Aspire.Hosting.Containers.Tests (1)
ContainerFileSystemCallbackContextTests.cs (1)
16Services = new ServiceCollection().BuildServiceProvider(),
Aspire.Hosting.DevTunnels.Tests (1)
DevTunnelCliVersionValidationTests.cs (1)
29var services = new ServiceCollection()
Aspire.Hosting.RemoteHost.Tests (9)
CodeGeneration\ApiReferenceExportTests.cs (1)
242var services = new ServiceCollection().BuildServiceProvider();
CodeGenerationResolverTests.cs (1)
90private static ServiceProvider CreateServiceProvider() => new ServiceCollection().BuildServiceProvider();
ResolverDiagnosticsTests.cs (4)
28using var services = new ServiceCollection().BuildServiceProvider(); 46using var services = new ServiceCollection().BuildServiceProvider(); 65using var services = new ServiceCollection().BuildServiceProvider(); 81using var services = new ServiceCollection().BuildServiceProvider();
ServiceErrorMessageTests.cs (3)
88var services = new ServiceCollection().BuildServiceProvider(); 104var services = new ServiceCollection().BuildServiceProvider(); 125var services = new ServiceCollection().BuildServiceProvider();
Aspire.Hosting.Testing.Tests (3)
DistributedApplicationHttpClientExtensionsForTests.cs (2)
31var services = new ServiceCollection(); 43var services = new ServiceCollection();
ResourceLoggerForwarderServiceTests.cs (1)
146return new ResourceNotificationService(NullLogger<ResourceNotificationService>.Instance, hostApplicationLifetime, new ServiceCollection().BuildServiceProvider(), resourceLoggerService);
Aspire.Hosting.Tests (57)
ApplicationModel\Docker\DockerfileBuilderCallbackAnnotationTests.cs (6)
55var services = new ServiceCollection().BuildServiceProvider(); 82var services = new ServiceCollection().BuildServiceProvider(); 109var services = new ServiceCollection().BuildServiceProvider(); 137var services = new ServiceCollection() 185var services = new ServiceCollection().BuildServiceProvider(); 220var services = new ServiceCollection().BuildServiceProvider();
ApplicationModel\Docker\DockerfileBuilderCallbackContextTests.cs (7)
20var services = new ServiceCollection().BuildServiceProvider(); 36var services = new ServiceCollection().BuildServiceProvider(); 47var services = new ServiceCollection().BuildServiceProvider(); 70var services = new ServiceCollection().BuildServiceProvider(); 93var services = new ServiceCollection().BuildServiceProvider(); 111var services = new ServiceCollection() 130var services = new ServiceCollection().BuildServiceProvider();
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (4)
32using var services = new ServiceCollection() 96using var services = new ServiceCollection() 2828using var services = new ServiceCollection() 2865using var services = new ServiceCollection()
Backchannel\GetTerminalInfoAsyncTests.cs (1)
330var services = new ServiceCollection();
Dashboard\DashboardServiceDataTerminalTests.cs (3)
194new ServiceCollection().BuildServiceProvider(), 199new ServiceCollection().BuildServiceProvider(), 206new ResourceCommandService(notifications, loggerService, new ServiceCollection().BuildServiceProvider()),
Dashboard\DashboardServiceTests.cs (11)
472new ServiceCollection().BuildServiceProvider(), 543new ServiceCollection().BuildServiceProvider(), 591new ServiceCollection().BuildServiceProvider(), 651new ServiceCollection().BuildServiceProvider(), 689new ServiceCollection().BuildServiceProvider(), 1074new ServiceCollection().BuildServiceProvider(), 1113new ServiceCollection().BuildServiceProvider(), 1177new ServiceCollection().BuildServiceProvider(), 1295new ServiceCollection().BuildServiceProvider(), 1303new ResourceCommandService(resourceNotificationService, resourceLoggerService, new ServiceCollection().BuildServiceProvider()), 1310return new ResourceNotificationService(NullLogger<ResourceNotificationService>.Instance, new TestHostApplicationLifetime(), new ServiceCollection().BuildServiceProvider(), resourceLoggerService);
InteractionServiceTests.cs (4)
221new ServiceCollection().BuildServiceProvider(), 249new ServiceCollection().BuildServiceProvider(), 272new ServiceCollection().BuildServiceProvider(), 1341new ServiceCollection().BuildServiceProvider(),
Orchestrator\ApplicationOrchestratorTests.cs (2)
1122var services = new ServiceCollection(); 1159new ServiceCollection().BuildServiceProvider(),
Orchestrator\ParameterProcessorTests.cs (8)
935Services = new ServiceCollection().BuildServiceProvider(), 961Services = new ServiceCollection().BuildServiceProvider(), 995Services = new ServiceCollection().BuildServiceProvider(), 1003Services = new ServiceCollection().BuildServiceProvider(), 1032Services = new ServiceCollection().BuildServiceProvider(), 1064Services = new ServiceCollection().BuildServiceProvider(), 1295new ServiceCollection().BuildServiceProvider(), 1363var services = new ServiceCollection();
PersistentContainerWarningTests.cs (3)
22var services = new ServiceCollection(); 46var services = new ServiceCollection(); 70var services = new ServiceCollection();
Publishing\ContainerRuntimeResolverTests.cs (1)
20var services = new ServiceCollection();
Publishing\PipelineActivityReporterTests.cs (1)
1397var services = new ServiceCollection();
RequiredCommandAnnotationTests.cs (2)
473using var services = new ServiceCollection().BuildServiceProvider(); 485using var services = new ServiceCollection().BuildServiceProvider();
ResourceCommandAnnotationTests.cs (2)
67Services = new ServiceCollection().BuildServiceProvider() 147Services = new ServiceCollection().BuildServiceProvider()
tests\Aspire.Hosting.Testing.Tests\DistributedApplicationHttpClientExtensionsForTests.cs (2)
31var services = new ServiceCollection(); 43var services = new ServiceCollection();
Aspire.Hosting.TestUtilities (3)
Utils\ManifestUtils.cs (3)
27var serviceCollection = new ServiceCollection(); 53Services = new ServiceCollection().BuildServiceProvider() 72Services = new ServiceCollection().BuildServiceProvider()
Aspire.Keycloak.Authentication.Tests (20)
KeycloakAuthenticationPublicApiTests.cs (20)
32var services = new ServiceCollection(); 50var services = new ServiceCollection(); 82var services = new ServiceCollection(); 101var services = new ServiceCollection(); 120var services = new ServiceCollection(); 153var services = new ServiceCollection(); 172var services = new ServiceCollection(); 210var services = new ServiceCollection(); 234var services = new ServiceCollection(); 258var services = new ServiceCollection(); 295var services = new ServiceCollection(); 313var services = new ServiceCollection(); 345var services = new ServiceCollection(); 364var services = new ServiceCollection(); 383var services = new ServiceCollection(); 416var services = new ServiceCollection(); 435var services = new ServiceCollection(); 473var services = new ServiceCollection(); 497var services = new ServiceCollection(); 521var services = new ServiceCollection();
Aspire.Playground.Tests (1)
Infrastructure\DistributedApplicationExtensions.cs (1)
196var services = new ServiceCollection()
Aspire.Templates.Tests (1)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
505var services = new ServiceCollection();
Microsoft.Arcade.Common (1)
MSBuildTaskBase.cs (1)
32ServiceCollection collection = new ServiceCollection();
Microsoft.AspNetCore.AsyncState.Tests (2)
AsyncContextHttpContextOfTTests.cs (1)
20var serviceCollection = new ServiceCollection()
AsyncStateHttpContextExtensionsTests.cs (1)
24var services = new ServiceCollection();
Microsoft.AspNetCore.Components.WebAssembly (1)
Hosting\WebAssemblyHostBuilder.cs (1)
85Services = new ServiceCollection();
Microsoft.AspNetCore.DataProtection.Extensions (1)
DataProtectionProvider.cs (1)
127var serviceCollection = new ServiceCollection();
Microsoft.AspNetCore.DataProtection.MicroBenchmarks (1)
Benchmarks\SpanDataProtectorComparison.cs (1)
68var services = new ServiceCollection();
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (20)
Latency\AddServerTimingHeaderMiddlewareTests.cs (1)
29using var serviceProvider = new ServiceCollection()
Latency\HttpLatencyTelemetryServiceCollectionExtensionsTests.cs (1)
23using var serviceProvider = new ServiceCollection()
Latency\RequestLatencyTelemetryExtensionsTests.cs (4)
23RequestLatencyTelemetryServiceCollectionExtensions.AddRequestLatencyTelemetry(new ServiceCollection(), configure: null!)); 25RequestLatencyTelemetryServiceCollectionExtensions.AddRequestLatencyTelemetry(new ServiceCollection(), section: null!)); 33using var serviceProvider = new ServiceCollection() 58using var serviceProvider = new ServiceCollection()
Logging\HttpLoggingServiceExtensionsTests.cs (6)
35var services = new ServiceCollection(); 59var services = new ServiceCollection(); 101var services = new ServiceCollection(); 120var services = new ServiceCollection(); 139var services = new ServiceCollection(); 160var services = new ServiceCollection();
Logging\HttpUtilityExtensionsTests.cs (1)
27var sp = new ServiceCollection().AddHttpRouteUtilities().BuildServiceProvider();
Logging\LoggingOptionsValidationTests.cs (3)
22using var services = new ServiceCollection() 38using var services = new ServiceCollection() 54using var services = new ServiceCollection()
Logging\RequestHeadersEnricherExtensionsTests.cs (4)
25new ServiceCollection().AddRequestHeadersLogEnricher(null!)); 31using var sp = new ServiceCollection() 42using var serviceProvider = new ServiceCollection() 55using var serviceProvider = new ServiceCollection()
Microsoft.AspNetCore.HeaderParsing.Tests (10)
HeaderParsingExtensionsTests.cs (8)
21using var services = new ServiceCollection() 33using var services = new ServiceCollection() 43using var services = new ServiceCollection() 53using var services = new ServiceCollection() 87var context = CreateContext(new ServiceCollection().AddSingleton(headerRegistry.Object)); 94var context = CreateContext(new ServiceCollection().AddHeaderParsing()); 108var context = CreateContext(new ServiceCollection().AddHeaderParsing()); 123services ??= new ServiceCollection();
HeaderParsingFeatureTests.cs (1)
34_services = new ServiceCollection();
HeaderRegistryTests.cs (1)
21_services = new ServiceCollection();
Microsoft.AspNetCore.Hosting (2)
Internal\ServiceCollectionExtensions.cs (1)
12IServiceCollection clone = new ServiceCollection();
WebHostBuilder.cs (1)
267var services = new ServiceCollection();
Microsoft.AspNetCore.InternalTesting (2)
AssemblyTestLog.cs (2)
163var serviceCollection = new ServiceCollection(); 195var serviceCollection = new ServiceCollection();
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnectionBuilder.cs (1)
29Services = new ServiceCollection();
Microsoft.AspNetCore.Testing.Tests (2)
FakeStartupTests.cs (2)
20sut.Configure(new ApplicationBuilder(new ServiceCollection().BuildServiceProvider())); 22sut.ConfigureServices(new ServiceCollection());
Microsoft.DotNet.Internal.DependencyInjection.Testing (1)
DependencyInjectionValidation.cs (1)
44var services = new ServiceCollection();
Microsoft.Extensions.AI.Abstractions.Tests (3)
Functions\AIFunctionArgumentsTests.cs (3)
50ServiceCollection sc = new(); 68ServiceCollection sc = new(); 106ServiceCollection sc = new();
Microsoft.Extensions.AI.Tests (57)
ChatCompletion\ChatClientBuilderTest.cs (1)
15var expectedServiceProvider = new ServiceCollection().BuildServiceProvider();
ChatCompletion\DependencyInjectionPatterns.cs (7)
12private IServiceCollection ServiceCollection { get; } = new ServiceCollection(); 119ServiceCollection sc = new(); 141ServiceCollection sc = new(); 164ServiceCollection sc = new(); 187ServiceCollection sc = new(); 209ServiceCollection sc = new(); 233ServiceCollection sc = new();
ChatCompletion\DistributedCachingChatClientTest.cs (1)
737var services = new ServiceCollection()
ChatCompletion\FunctionInvokingChatClientTests.cs (6)
1064ServiceCollection c = new(); 1455ServiceCollection c = new(); 3247ServiceCollection c = new(); 3276ServiceCollection c = new(); 3308ServiceCollection c = new(); 3341ServiceCollection c = new();
ChatCompletion\ImageGeneratingChatClientTests.cs (1)
154var services = new ServiceCollection();
ChatCompletion\LoggingChatClientTests.cs (2)
35ServiceCollection c = new(); 51ServiceCollection c = new();
ChatCompletion\ReducingChatClientTests.cs (2)
101var services = new ServiceCollection(); 127var services = new ServiceCollection().BuildServiceProvider();
Embeddings\DistributedCachingEmbeddingGeneratorTest.cs (1)
376var services = new ServiceCollection()
Embeddings\EmbeddingGeneratorBuilderTests.cs (1)
15var expectedServiceProvider = new ServiceCollection().BuildServiceProvider();
Embeddings\LoggingEmbeddingGeneratorTests.cs (2)
34ServiceCollection c = new(); 50ServiceCollection c = new();
Files\HostedFileClientBuilderTests.cs (1)
30var expectedServiceProvider = new ServiceCollection().BuildServiceProvider();
Files\LoggingHostedFileClientTests.cs (2)
38ServiceCollection c = new(); 54ServiceCollection c = new();
Functions\AIFunctionFactoryTest.cs (8)
633ServiceCollection sc = new(); 679ServiceCollection sc = new(); 709ServiceCollection sc = new(); 823ServiceCollection sc = new(); 846ServiceCollection sc = new(); 869ServiceCollection sc = new(); 941IServiceProvider sp1 = new ServiceCollection().AddSingleton(new MyService(42)).BuildServiceProvider(); 942IServiceProvider sp2 = new ServiceCollection().AddSingleton(new MyService(43)).BuildServiceProvider();
Image\ImageGeneratorBuilderTests.cs (1)
15var expectedServiceProvider = new ServiceCollection().BuildServiceProvider();
Image\ImageGeneratorDependencyInjectionPatterns.cs (4)
12private IServiceCollection ServiceCollection { get; } = new ServiceCollection(); 119ServiceCollection sc = new(); 141ServiceCollection sc = new(); 160ServiceCollection sc = new();
Image\LoggingImageGeneratorTests.cs (2)
35ServiceCollection c = new(); 51ServiceCollection c = new();
Realtime\LoggingRealtimeClientTests.cs (3)
45ServiceCollection c = new(); 70ServiceCollection c = new(); 112ServiceCollection c = new();
SpeechToText\LoggingSpeechToTextClientTests.cs (2)
37ServiceCollection c = new(); 53ServiceCollection c = new();
SpeechToText\SpeechToTextClientDependencyInjectionPatterns.cs (4)
12private IServiceCollection ServiceCollection { get; } = new ServiceCollection(); 119ServiceCollection sc = new(); 141ServiceCollection sc = new(); 160ServiceCollection sc = new();
TextToSpeech\LoggingTextToSpeechClientTests.cs (2)
35ServiceCollection c = new(); 51ServiceCollection c = new();
TextToSpeech\TextToSpeechClientDependencyInjectionPatterns.cs (4)
12private IServiceCollection ServiceCollection { get; } = new ServiceCollection(); 119ServiceCollection sc = new(); 141ServiceCollection sc = new(); 160ServiceCollection sc = new();
Microsoft.Extensions.AmbientMetadata.Application.Tests (4)
ApplicationMetadataExtensionsTests.cs (4)
35var serviceCollection = new ServiceCollection(); 51var serviceCollection = new ServiceCollection(); 131using var provider = new ServiceCollection() 151using var provider = new ServiceCollection()
Microsoft.Extensions.AmbientMetadata.Build.Tests (3)
BuildMetadataServiceCollectionExtensionsTests.cs (3)
19var serviceCollection = new ServiceCollection(); 61using var provider = new ServiceCollection() 84using var provider = new ServiceCollection()
Microsoft.Extensions.AsyncState.Tests (2)
AsyncContextServiceCollectionExtensionsTests.cs (1)
23var services = new ServiceCollection();
AsyncStateTests.cs (1)
257var services = new ServiceCollection().AddAsyncState().BuildServiceProvider();
Microsoft.Extensions.Caching.Hybrid.Tests (47)
BufferReleaseTests.cs (2)
26var services = new ServiceCollection(); 259using ServiceProvider services = new ServiceCollection().BuildServiceProvider();
DistributedCacheTests.cs (1)
45var services = new ServiceCollection();
ExpirationTests.cs (1)
30ServiceCollection services = new();
FunctionalTests.cs (1)
14var services = new ServiceCollection();
L2Tests.cs (1)
37var services = new ServiceCollection();
LocalInvalidationTests.cs (1)
17var services = new ServiceCollection();
PayloadTests.cs (1)
20var services = new ServiceCollection();
RedisTests.cs (1)
45var services = new ServiceCollection();
SampleUsage.cs (4)
16var services = new ServiceCollection(); 36var services = new ServiceCollection(); 56var services = new ServiceCollection(); 76var services = new ServiceCollection();
SerializerTests.cs (1)
238var services = new ServiceCollection();
ServiceConstructionTests.cs (25)
29var services = new ServiceCollection(); 38var services = new ServiceCollection(); 58var services = new ServiceCollection(); 74var services = new ServiceCollection(); 84var services = new ServiceCollection(); 95var services = new ServiceCollection(); 109var services = new ServiceCollection(); 124var services = new ServiceCollection(); 146var services = new ServiceCollection(); 161var services = new ServiceCollection(); 183var services = new ServiceCollection(); 207var services = new ServiceCollection(); 243var services = new ServiceCollection(); 320var services = new ServiceCollection(); 360var services = new ServiceCollection(); 398var services = new ServiceCollection(); 428var services = new ServiceCollection(); 441var services = new ServiceCollection(); 454var services = new ServiceCollection(); 468var services = new ServiceCollection(); 480var services = new ServiceCollection(); 494var services = new ServiceCollection(); 514var services = new ServiceCollection(); 528var services = new ServiceCollection(); 589var services = new ServiceCollection();
SizeTests.cs (4)
32var services = new ServiceCollection(); 101var services = new ServiceCollection(); 154var services = new ServiceCollection(); 216var services = new ServiceCollection();
StampedeTests.cs (2)
17var services = new ServiceCollection(); 65var services = new ServiceCollection();
UnreliableL2Tests.cs (2)
128var services = new ServiceCollection(); 136services = new ServiceCollection();
Microsoft.Extensions.Compliance.Abstractions.Tests (1)
Classification\DataClassificationTypeConverterTests.cs (1)
45IServiceCollection serviceCollection = new ServiceCollection()
Microsoft.Extensions.Compliance.Redaction.Tests (9)
HmacRedactorExtensionsTests.cs (2)
16using var serviceProvider = new ServiceCollection() 29using var serviceProvider = new ServiceCollection()
HmacRedactorTest.cs (2)
95var redactorProvider = new ServiceCollection() 123var redactorProvider = new ServiceCollection()
RedactionAcceptanceTests.cs (4)
20using var services = new ServiceCollection() 43using var services = new ServiceCollection() 57Assert.Throws<ArgumentNullException>(() => new ServiceCollection().AddRedaction(null!)); 63using var serviceProvider = new ServiceCollection()
RedactorProviderTests.cs (1)
78var redactorProvider = new ServiceCollection()
Microsoft.Extensions.Compliance.Testing.Tests (14)
RedactionFakesAcceptanceTests.cs (13)
20using var services = new ServiceCollection() 39using var services = new ServiceCollection() 59using var services = new ServiceCollection() 78using var services = new ServiceCollection() 98using var services = new ServiceCollection() 117using var services = new ServiceCollection() 137using var services = new ServiceCollection() 157using var services = new ServiceCollection() 177using var services = new ServiceCollection() 199using var services = new ServiceCollection() 234Assert.Throws<ArgumentNullException>(() => new ServiceCollection().AddRedaction(x => x.SetFakeRedactor((Action<FakeRedactorOptions>)null!, dc))); 239Assert.Throws<ArgumentNullException>(() => new ServiceCollection().AddFakeRedaction(null!)); 245using var sp = new ServiceCollection().AddFakeRedaction().BuildServiceProvider();
RedactionFakesEventCollectorTests.cs (1)
25using var sp = new ServiceCollection().BuildServiceProvider();
Microsoft.Extensions.DependencyInjection.AutoActivation.Tests (6)
AutoActivationExtensionsKeyedTests.cs (3)
18var serviceCollection = new ServiceCollection(); 44var serviceCollection = new ServiceCollection(); 67var serviceCollection = new ServiceCollection();
AutoActivationExtensionsTests.cs (3)
24var serviceCollection = new ServiceCollection(); 50var serviceCollection = new ServiceCollection(); 73var serviceCollection = new ServiceCollection();
Microsoft.Extensions.Diagnostics.ExceptionSummarization.Tests (2)
ExceptionSummaryExtensionsTests.cs (1)
14IServiceCollection services = new ServiceCollection();
HttpExceptionSummaryProviderExtensionsTests.cs (1)
14IServiceCollection services = new ServiceCollection();
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (9)
ApplicationLifecycleHealthChecksExtensionsTests.cs (3)
19var serviceCollection = new ServiceCollection(); 29var serviceCollection = new ServiceCollection(); 39var serviceCollection = new ServiceCollection();
ManualHealthCheckExtensionsTests.cs (3)
17var serviceCollection = new ServiceCollection(); 26var serviceCollection = new ServiceCollection(); 35var serviceCollection = new ServiceCollection();
TelemetryHealthChecksPublisherExtensionsTests.cs (3)
17var serviceCollection = new ServiceCollection(); 34var serviceCollection = new ServiceCollection(); 54var serviceCollection = new ServiceCollection();
Microsoft.Extensions.Diagnostics.HealthChecks.ResourceUtilization.Tests (22)
ResourceHealthCheckExtensionsTests.cs (22)
36var serviceCollection = new ServiceCollection(); 56var serviceCollection = new ServiceCollection(); 76var serviceCollection = new ServiceCollection(); 100var serviceCollection = new ServiceCollection(); 117var serviceCollection = new ServiceCollection(); 135var serviceCollection = new ServiceCollection(); 155var serviceCollection = new ServiceCollection(); 172var serviceCollection = new ServiceCollection(); 190var serviceCollection = new ServiceCollection(); 210var serviceCollection = new ServiceCollection(); 231var serviceCollection = new ServiceCollection(); 252var serviceCollection = new ServiceCollection(); 274var serviceCollection = new ServiceCollection(); 295var serviceCollection = new ServiceCollection(); 317var serviceCollection = new ServiceCollection(); 333var serviceCollection = new ServiceCollection(); 351var serviceCollection = new ServiceCollection(); 369var serviceCollection = new ServiceCollection(); 388var serviceCollection = new ServiceCollection(); 406var serviceCollection = new ServiceCollection(); 425var serviceCollection = new ServiceCollection(); 447var serviceCollection = new ServiceCollection();
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Kubernetes.Tests (4)
KubernetesResourceQuotasServiceCollectionExtensionsTests.cs (4)
18IServiceCollection services = new ServiceCollection(); 46IServiceCollection services = new ServiceCollection(); 74IServiceCollection services = new ServiceCollection(); 98IServiceCollection services = new ServiceCollection();
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (9)
ResourceMonitoringBuilderTests.cs (2)
22using var provider = new ServiceCollection() 43using var provider = new ServiceCollection()
ResourceMonitoringExtensionsTests.cs (7)
26var services = new ServiceCollection(); 39using var provider = new ServiceCollection() 61using var provider = new ServiceCollection() 79using var provider = new ServiceCollection() 228var services = new ServiceCollection(); 243var services = new ServiceCollection(); 258var services = new ServiceCollection();
Microsoft.Extensions.Diagnostics.Testing.Tests (4)
Logging\FakeLoggerExtensionsTests.cs (4)
18using var serviceProvider = new ServiceCollection() 34using var serviceProvider = new ServiceCollection() 62using var serviceProvider = new ServiceCollection() 82using var serviceProvider = new ServiceCollection()
Microsoft.Extensions.Hosting (2)
HostApplicationBuilder.cs (1)
23private readonly ServiceCollection _serviceCollection = new();
HostBuilder.cs (1)
336var services = new ServiceCollection();
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (8)
HttpClientFactory.cs (8)
16var services = new ServiceCollection(); 40var services = new ServiceCollection(); 63var services = new ServiceCollection(); 90var services = new ServiceCollection(); 113var services = new ServiceCollection(); 136var services = new ServiceCollection(); 162=> new ServiceCollection() 172=> new ServiceCollection()
Microsoft.Extensions.Http.Diagnostics.Tests (46)
Latency\HttpClientLatencyTelemetryExtensionsTest.cs (4)
36using var sp = new ServiceCollection() 60using var sp = new ServiceCollection() 74using var sp = new ServiceCollection() 98using var sp = new ServiceCollection()
Logging\AcceptanceTests.cs (15)
30await using var sp = new ServiceCollection() 62await using var sp = new ServiceCollection() 96await using var sp = new ServiceCollection() 133await using var provider = new ServiceCollection() 210await using var provider = new ServiceCollection() 295await using var sp = new ServiceCollection() 341await using var sp = new ServiceCollection() 406await using var sp = new ServiceCollection() 447using var provider = new ServiceCollection() 481using var provider = new ServiceCollection() 516using var provider = new ServiceCollection() 581await using var provider = new ServiceCollection() 603await using var provider = new ServiceCollection() 631await using var provider = new ServiceCollection() 659await using var provider = new ServiceCollection()
Logging\HttpClientLoggerTest.cs (1)
1019var builder = new ServiceCollection()
Logging\HttpClientLoggingExtensionsTest.cs (20)
87var services = new ServiceCollection(); 110var services = new ServiceCollection(); 133var services = new ServiceCollection(); 164var services = new ServiceCollection(); 234using var provider = new ServiceCollection() 271using var provider = new ServiceCollection() 362var services = new ServiceCollection(); 395using var provider = new ServiceCollection() 417using var provider = new ServiceCollection() 440using var provider = new ServiceCollection() 461using var provider = new ServiceCollection() 485var services = new ServiceCollection(); 531using var provider = new ServiceCollection() 553using var provider = new ServiceCollection() 576using var provider = new ServiceCollection() 596using var provider = new ServiceCollection() 624using var provider = new ServiceCollection() 640using var sp = new ServiceCollection() 653await using var sp = new ServiceCollection() 688var serviceCollection = new ServiceCollection();
Logging\HttpRequestReaderTest.cs (1)
927var services = new ServiceCollection();
Telemetry\HttpDependencyMetadataResolverTests.cs (1)
19_sp = new ServiceCollection()
TelemetryCommonExtensionsTests.cs (4)
40var sp = new ServiceCollection().AddFakeRedaction().AddHttpRouteProcessor().BuildServiceProvider(); 55var sp = new ServiceCollection().AddFakeRedaction().AddHttpHeadersRedactor().BuildServiceProvider(); 63var serviceCollection = new ServiceCollection(); 87var serviceCollection = new ServiceCollection();
Microsoft.Extensions.Http.Resilience.PerformanceTests (3)
HttpClientFactory.cs (1)
36var services = new ServiceCollection();
RetryBenchmark.cs (1)
32var services = new ServiceCollection();
StandardResilienceBenchmark.cs (1)
32var services = new ServiceCollection();
Microsoft.Extensions.Http.Resilience.Tests (29)
Hedging\HedgingTests.cs (1)
47_services = new ServiceCollection().AddMetrics().AddLogging();
Hedging\StandardHedgingTests.cs (1)
308var services = new ServiceCollection();
Resilience\GrpcResilienceTests.cs (1)
103var services = new ServiceCollection();
Resilience\HttpClientBuilderExtensionsTests.Resilience.cs (13)
29var services = new ServiceCollection(); 47var services = new ServiceCollection(); 67var services = new ServiceCollection(); 90var services = new ServiceCollection(); 120var clientBuilder = new ServiceCollection() 170var services = new ServiceCollection(); 204var services = new ServiceCollection().AddLogging().AddMetrics().AddFakeRedaction(); 248var services = new ServiceCollection().AddLogging().AddMetrics(); 279var clientBuilder = new ServiceCollection().AddLogging().AddMetrics().AddRedaction() 293var services = new ServiceCollection(); 301var services = new ServiceCollection(); 326var services = new ServiceCollection(); 342var services = new ServiceCollection();
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (9)
31_builder = new ServiceCollection().AddHttpClient(BuilderName); 115var builder = new ServiceCollection().AddHttpClient("test"); 126var builder = new ServiceCollection().AddHttpClient("test"); 136var builder = new ServiceCollection().AddHttpClient("test"); 146var builder = new ServiceCollection().AddLogging().AddMetrics().AddHttpClient("test"); 156using var serviceProvider = new ServiceCollection() 182var builder = new ServiceCollection().AddLogging().AddMetrics().AddHttpClient("test"); 211var builder = new ServiceCollection().AddLogging().AddMetrics().AddHttpClient("test"); 264var builder = new ServiceCollection().AddLogging().AddMetrics().AddHttpClient("test").AddStandardResilienceHandler();
Routing\RoutingStrategyTest.cs (4)
26Builder = new RoutingStrategyBuilder(RoutingName, new ServiceCollection()); 81Builder = new RoutingStrategyBuilder(RoutingName, new ServiceCollection()); 100Builder = new RoutingStrategyBuilder(RoutingName, new ServiceCollection()); 136Builder = new RoutingStrategyBuilder(RoutingName, new ServiceCollection());
Microsoft.Extensions.Logging (1)
LoggerFactory.cs (1)
114var serviceCollection = new ServiceCollection();
Microsoft.Extensions.ML.Tests (8)
FileLoaderTests.cs (3)
29var services = new ServiceCollection() 42var services = new ServiceCollection() 61var services = new ServiceCollection()
PredictionEnginePoolTests.cs (2)
30var services = new ServiceCollection() 120var services = new ServiceCollection().AddOptions().AddLogging();
UriLoaderTests.cs (3)
29var services = new ServiceCollection() 42var services = new ServiceCollection() 61var services = new ServiceCollection()
Microsoft.Extensions.ObjectPool.DependencyInjection.Tests (15)
DependencyInjectionExtensionsTests.cs (15)
34() => new ServiceCollection().ConfigurePools(builder.Build().GetSection("My:Pools"))); 51var services = new ServiceCollection().ConfigurePools(builder.Build().GetSection("My:Pools")); 63var services = new ServiceCollection() 81Assert.Throws<ArgumentNullException>(() => new ServiceCollection().ConfigurePools(null!)); 87var services = new ServiceCollection().AddPooled<TestDependency>(); 98var services = new ServiceCollection() 115var services = new ServiceCollection().AddPooled<TestDependency>(options => options.Capacity = 64); 128var services = new ServiceCollection() 142var services = new ServiceCollection() 158var services = new ServiceCollection() 177var services = new ServiceCollection() 212var services = new ServiceCollection() 223var services = new ServiceCollection() 258var services = new ServiceCollection() 315var services = new ServiceCollection()
Microsoft.Extensions.Options.Contextual.Tests (5)
ContextualOptionsServiceCollectionExtensionsTests.cs (5)
22using var provider = new ServiceCollection().AddContextualOptions().BuildServiceProvider(); 35using var provider = new ServiceCollection().Configure(loadOptions).BuildServiceProvider(); 45using var provider = new ServiceCollection().Configure(configureOptions).BuildServiceProvider(); 57using var provider = new ServiceCollection().ConfigureAll(loadOptions).BuildServiceProvider(); 67using var provider = new ServiceCollection().ConfigureAll(configureOptions).BuildServiceProvider();
Microsoft.Extensions.Resilience.PerformanceTests (1)
ResilienceEnrichmentBenchmark.cs (1)
40var services = new ServiceCollection();
Microsoft.Extensions.Resilience.Tests (2)
Resilience\ResilienceServiceCollectionExtensionsTests.cs (2)
27_services = new ServiceCollection().AddResilienceEnricher(); 46var services = new ServiceCollection().AddResilienceEnricher();
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (14)
DnsServiceEndpointResolverTests.cs (1)
18var services = new ServiceCollection()
DnsServicePublicApiTests.cs (2)
38IServiceCollection services = new ServiceCollection(); 84IServiceCollection services = new ServiceCollection();
DnsSrvServiceEndpointResolverTests.cs (4)
58var services = new ServiceCollection() 93var services = new ServiceCollection() 132var services = new ServiceCollection() 192var serviceCollection = new ServiceCollection()
Resolver\LoopbackDnsTestBase.cs (1)
42ServiceCollection services = new();
ServiceDiscoveryDnsServiceCollectionExtensionsTests.cs (6)
20var services = new ServiceCollection(); 32var services = new ServiceCollection(); 44var services = new ServiceCollection(); 57var services = new ServiceCollection(); 70var services = new ServiceCollection(); 83var services = new ServiceCollection();
Microsoft.Extensions.ServiceDiscovery.Tests (22)
ConfigurationServiceEndpointResolverTests.cs (7)
27var services = new ServiceCollection() 63var services = new ServiceCollection() 144var services = new ServiceCollection() 244var services = new ServiceCollection() 286var services = new ServiceCollection() 353var services = new ServiceCollection() 398var services = new ServiceCollection()
ExtensionsServicePublicApiTests.cs (3)
56var services = new ServiceCollection(); 91var services = new ServiceCollection(); 126var services = new ServiceCollection();
PassThroughServiceEndpointResolverTests.cs (4)
23var services = new ServiceCollection() 54var services = new ServiceCollection() 87var services = new ServiceCollection() 121var services = new ServiceCollection()
ServiceEndpointResolverTests.cs (8)
25var services = new ServiceCollection() 36var services = new ServiceCollection() 49var services = new ServiceCollection() 59var serviceCollection = new ServiceCollection(); 104var services = new ServiceCollection() 156var services = new ServiceCollection() 192var services = new ServiceCollection() 237var services = new ServiceCollection()
Microsoft.Extensions.ServiceDiscovery.Yarp.Tests (7)
YarpServiceDiscoveryTests.cs (7)
33await using var services = new ServiceCollection() 63await using var services = new ServiceCollection() 93await using var services = new ServiceCollection() 127await using var services = new ServiceCollection() 205await using var services = new ServiceCollection() 237await using var services = new ServiceCollection() 286await using var services = new ServiceCollection()
Microsoft.Extensions.Telemetry.Abstractions.Tests (13)
Enrichment\EnricherExtensionsTests.cs (4)
16Assert.Throws<ArgumentNullException>(() => new ServiceCollection().AddLogEnricher(null!)); 30new ServiceCollection().AddLogEnricher(null!)); 36var services = new ServiceCollection(); 55var services = new ServiceCollection();
Latency\LatencyRegistryExtensionsTests.cs (7)
17() => LatencyRegistryServiceCollectionExtensions.RegisterCheckpointNames(new ServiceCollection(), null!)); 23() => LatencyRegistryServiceCollectionExtensions.RegisterMeasureNames(new ServiceCollection(), null!)); 27() => LatencyRegistryServiceCollectionExtensions.RegisterTagNames(new ServiceCollection(), null!)); 33Assert.Throws<ArgumentException>(() => LatencyRegistryServiceCollectionExtensions.RegisterCheckpointNames(new ServiceCollection(), "")); 34Assert.Throws<ArgumentException>(() => LatencyRegistryServiceCollectionExtensions.RegisterMeasureNames(new ServiceCollection(), "")); 35Assert.Throws<ArgumentException>(() => LatencyRegistryServiceCollectionExtensions.RegisterTagNames(new ServiceCollection(), "")); 41var services = RegisterNames(new ServiceCollection());
Latency\NoopLatencyContextTests.cs (2)
22using var serviceProvider = new ServiceCollection() 34using var serviceProvider = new ServiceCollection()
Microsoft.Extensions.Telemetry.PerformanceTests (1)
ExtendedLoggerBench.cs (1)
69var serviceCollection = new ServiceCollection();
Microsoft.Extensions.Telemetry.Tests (33)
Enrichment\ApplicationEnricherExtensionsTests.cs (1)
30new ServiceCollection().AddApplicationLogEnricher((IConfigurationSection)null!));
Enrichment\ProcessEnricherExtensionsTests.cs (2)
30new ServiceCollection().AddProcessLogEnricher((IConfigurationSection)null!)); 33new ServiceCollection().AddProcessLogEnricher((Action<ProcessLogEnricherOptions>)null!));
Enrichment\ServiceEnricherExtensionsTests.cs (1)
31new ServiceCollection().AddServiceLogEnricher((IConfigurationSection)null!));
Http\HttpParserTests.cs (1)
644var sp = new ServiceCollection().AddHttpRouteProcessor().AddFakeRedaction().BuildServiceProvider();
Http\TelemetryCommonExtensionsTests.cs (1)
38var sp = new ServiceCollection().AddFakeRedaction().AddHttpRouteProcessor().BuildServiceProvider();
Latency\Internal\LatencyContextTests.cs (8)
77using var scope = new ServiceCollection() 103using var scope = new ServiceCollection() 129using var scope = new ServiceCollection() 156using var scope = new ServiceCollection() 187using var scope = new ServiceCollection() 214using var scope = new ServiceCollection() 239using var scope = new ServiceCollection() 264using var scope = new ServiceCollection()
Latency\LatencyConsoleExtensionsTests.cs (4)
19var s = new ServiceCollection(); 28using var serviceProvider = new ServiceCollection() 41using var serviceProvider = new ServiceCollection() 59using var provider = new ServiceCollection()
Latency\LatencyContextExtensionTests.cs (4)
27using var serviceProvider = new ServiceCollection() 43using var serviceProvider = new ServiceCollection() 70using var serviceProvider = new ServiceCollection() 95using var provider = new ServiceCollection()
Logging\Utils.cs (1)
13var serviceCollection = new ServiceCollection();
Sampling\SamplingLoggerBuilderExtensionsTests.cs (10)
23var serviceCollection = new ServiceCollection(); 39var serviceCollection = new ServiceCollection(); 64var serviceCollection = new ServiceCollection(); 117var serviceCollection = new ServiceCollection(); 159var serviceCollection = new ServiceCollection(); 176var serviceCollection = new ServiceCollection(); 199var serviceCollection = new ServiceCollection(); 218var serviceCollection = new ServiceCollection(); 236var serviceCollection = new ServiceCollection(); 251var serviceCollection = new ServiceCollection();
Microsoft.Extensions.VectorData.ConformanceTests (3)
DependencyInjectionTests.cs (1)
205IServiceCollection services = new ServiceCollection();
EmbeddingGenerationTests.cs (2)
71IServiceCollection serviceCollection = new ServiceCollection(); 92IServiceCollection serviceCollection = new ServiceCollection();
Microsoft.Gen.Logging.Generated.Tests (1)
Utils.cs (1)
71var serviceCollection = new ServiceCollection();
Microsoft.Maui (1)
Hosting\MauiAppBuilder.cs (1)
17 private readonly ServiceCollection _services = new();
Microsoft.ML.AutoML (1)
AutoMLExperiment\AutoMLExperiment.cs (1)
55_serviceCollection = new ServiceCollection();
Shared.Tests (3)
Debugger\DebuggerTest.cs (3)
23using var provider = new ServiceCollection() 36using var provider = new ServiceCollection() 49using var provider = new ServiceCollection()
261 references to ServiceCollection
Aspire.Cli.Tests (2)
ProgramTests.cs (1)
46var services = new ServiceCollection();
Utils\CliTestHelper.cs (1)
85var services = new ServiceCollection();
Aspire.EndToEnd.Tests (1)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
505var services = new ServiceCollection();
Aspire.Hosting.Testing.Tests (2)
DistributedApplicationHttpClientExtensionsForTests.cs (2)
31var services = new ServiceCollection(); 43var services = new ServiceCollection();
Aspire.Hosting.Tests (10)
Backchannel\GetTerminalInfoAsyncTests.cs (1)
330var services = new ServiceCollection();
Orchestrator\ApplicationOrchestratorTests.cs (1)
1122var services = new ServiceCollection();
Orchestrator\ParameterProcessorTests.cs (1)
1363var services = new ServiceCollection();
PersistentContainerWarningTests.cs (3)
22var services = new ServiceCollection(); 46var services = new ServiceCollection(); 70var services = new ServiceCollection();
Publishing\ContainerRuntimeResolverTests.cs (1)
20var services = new ServiceCollection();
Publishing\PipelineActivityReporterTests.cs (1)
1397var services = new ServiceCollection();
tests\Aspire.Hosting.Testing.Tests\DistributedApplicationHttpClientExtensionsForTests.cs (2)
31var services = new ServiceCollection(); 43var services = new ServiceCollection();
Aspire.Hosting.TestUtilities (1)
Utils\ManifestUtils.cs (1)
27var serviceCollection = new ServiceCollection();
Aspire.Keycloak.Authentication.Tests (20)
KeycloakAuthenticationPublicApiTests.cs (20)
32var services = new ServiceCollection(); 50var services = new ServiceCollection(); 82var services = new ServiceCollection(); 101var services = new ServiceCollection(); 120var services = new ServiceCollection(); 153var services = new ServiceCollection(); 172var services = new ServiceCollection(); 210var services = new ServiceCollection(); 234var services = new ServiceCollection(); 258var services = new ServiceCollection(); 295var services = new ServiceCollection(); 313var services = new ServiceCollection(); 345var services = new ServiceCollection(); 364var services = new ServiceCollection(); 383var services = new ServiceCollection(); 416var services = new ServiceCollection(); 435var services = new ServiceCollection(); 473var services = new ServiceCollection(); 497var services = new ServiceCollection(); 521var services = new ServiceCollection();
Aspire.Templates.Tests (1)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
505var services = new ServiceCollection();
Microsoft.Arcade.Common (1)
MSBuildTaskBase.cs (1)
32ServiceCollection collection = new ServiceCollection();
Microsoft.AspNetCore.AsyncState.Tests (1)
AsyncStateHttpContextExtensionsTests.cs (1)
24var services = new ServiceCollection();
Microsoft.AspNetCore.DataProtection.Extensions (1)
DataProtectionProvider.cs (1)
127var serviceCollection = new ServiceCollection();
Microsoft.AspNetCore.DataProtection.MicroBenchmarks (1)
Benchmarks\SpanDataProtectorComparison.cs (1)
68var services = new ServiceCollection();
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (6)
Logging\HttpLoggingServiceExtensionsTests.cs (6)
35var services = new ServiceCollection(); 59var services = new ServiceCollection(); 101var services = new ServiceCollection(); 120var services = new ServiceCollection(); 139var services = new ServiceCollection(); 160var services = new ServiceCollection();
Microsoft.AspNetCore.Hosting (2)
WebHostBuilder.cs (2)
267var services = new ServiceCollection(); 316private void ScanAssemblyAndRegisterStartup(ServiceCollection services, string startupAssemblyName)
Microsoft.AspNetCore.InternalTesting (2)
AssemblyTestLog.cs (2)
163var serviceCollection = new ServiceCollection(); 195var serviceCollection = new ServiceCollection();
Microsoft.DotNet.Internal.DependencyInjection.Testing (4)
DependencyInjectionValidation.cs (4)
34Action<ServiceCollection> register, 44var services = new ServiceCollection(); 92ServiceCollection services, 127ServiceCollection services,
Microsoft.Extensions.AI.Abstractions.Tests (3)
Functions\AIFunctionArgumentsTests.cs (3)
50ServiceCollection sc = new(); 68ServiceCollection sc = new(); 106ServiceCollection sc = new();
Microsoft.Extensions.AI.Tests (44)
ChatCompletion\DependencyInjectionPatterns.cs (6)
119ServiceCollection sc = new(); 141ServiceCollection sc = new(); 164ServiceCollection sc = new(); 187ServiceCollection sc = new(); 209ServiceCollection sc = new(); 233ServiceCollection sc = new();
ChatCompletion\FunctionInvokingChatClientTests.cs (6)
1064ServiceCollection c = new(); 1455ServiceCollection c = new(); 3247ServiceCollection c = new(); 3276ServiceCollection c = new(); 3308ServiceCollection c = new(); 3341ServiceCollection c = new();
ChatCompletion\ImageGeneratingChatClientTests.cs (1)
154var services = new ServiceCollection();
ChatCompletion\LoggingChatClientTests.cs (2)
35ServiceCollection c = new(); 51ServiceCollection c = new();
ChatCompletion\ReducingChatClientTests.cs (1)
101var services = new ServiceCollection();
Embeddings\LoggingEmbeddingGeneratorTests.cs (2)
34ServiceCollection c = new(); 50ServiceCollection c = new();
Files\LoggingHostedFileClientTests.cs (2)
38ServiceCollection c = new(); 54ServiceCollection c = new();
Functions\AIFunctionFactoryTest.cs (6)
633ServiceCollection sc = new(); 679ServiceCollection sc = new(); 709ServiceCollection sc = new(); 823ServiceCollection sc = new(); 846ServiceCollection sc = new(); 869ServiceCollection sc = new();
Image\ImageGeneratorDependencyInjectionPatterns.cs (3)
119ServiceCollection sc = new(); 141ServiceCollection sc = new(); 160ServiceCollection sc = new();
Image\LoggingImageGeneratorTests.cs (2)
35ServiceCollection c = new(); 51ServiceCollection c = new();
Realtime\LoggingRealtimeClientTests.cs (3)
45ServiceCollection c = new(); 70ServiceCollection c = new(); 112ServiceCollection c = new();
SpeechToText\LoggingSpeechToTextClientTests.cs (2)
37ServiceCollection c = new(); 53ServiceCollection c = new();
SpeechToText\SpeechToTextClientDependencyInjectionPatterns.cs (3)
119ServiceCollection sc = new(); 141ServiceCollection sc = new(); 160ServiceCollection sc = new();
TextToSpeech\LoggingTextToSpeechClientTests.cs (2)
35ServiceCollection c = new(); 51ServiceCollection c = new();
TextToSpeech\TextToSpeechClientDependencyInjectionPatterns.cs (3)
119ServiceCollection sc = new(); 141ServiceCollection sc = new(); 160ServiceCollection sc = new();
Microsoft.Extensions.AmbientMetadata.Application.Tests (2)
ApplicationMetadataExtensionsTests.cs (2)
35var serviceCollection = new ServiceCollection(); 51var serviceCollection = new ServiceCollection();
Microsoft.Extensions.AmbientMetadata.Build.Tests (1)
BuildMetadataServiceCollectionExtensionsTests.cs (1)
19var serviceCollection = new ServiceCollection();
Microsoft.Extensions.AsyncState.Tests (1)
AsyncContextServiceCollectionExtensionsTests.cs (1)
23var services = new ServiceCollection();
Microsoft.Extensions.Caching.Hybrid.Tests (49)
BufferReleaseTests.cs (2)
24private static ServiceProvider GetDefaultCache(out DefaultHybridCache cache, Action<ServiceCollection>? config = null) 26var services = new ServiceCollection();
DistributedCacheTests.cs (1)
45var services = new ServiceCollection();
ExpirationTests.cs (1)
30ServiceCollection services = new();
FunctionalTests.cs (2)
12private static ServiceProvider GetDefaultCache(out DefaultHybridCache cache, Action<ServiceCollection>? config = null) 14var services = new ServiceCollection();
L2Tests.cs (1)
37var services = new ServiceCollection();
LocalInvalidationTests.cs (2)
15private static ServiceProvider GetDefaultCache(out DefaultHybridCache cache, Action<ServiceCollection>? config = null) 17var services = new ServiceCollection();
PayloadTests.cs (2)
18private static ServiceProvider GetDefaultCache(out DefaultHybridCache cache, Action<ServiceCollection>? config = null) 20var services = new ServiceCollection();
RedisTests.cs (1)
45var services = new ServiceCollection();
SampleUsage.cs (4)
16var services = new ServiceCollection(); 36var services = new ServiceCollection(); 56var services = new ServiceCollection(); 76var services = new ServiceCollection();
SerializerTests.cs (1)
238var services = new ServiceCollection();
ServiceConstructionTests.cs (25)
29var services = new ServiceCollection(); 38var services = new ServiceCollection(); 58var services = new ServiceCollection(); 74var services = new ServiceCollection(); 84var services = new ServiceCollection(); 95var services = new ServiceCollection(); 109var services = new ServiceCollection(); 124var services = new ServiceCollection(); 146var services = new ServiceCollection(); 161var services = new ServiceCollection(); 183var services = new ServiceCollection(); 207var services = new ServiceCollection(); 243var services = new ServiceCollection(); 320var services = new ServiceCollection(); 360var services = new ServiceCollection(); 398var services = new ServiceCollection(); 428var services = new ServiceCollection(); 441var services = new ServiceCollection(); 454var services = new ServiceCollection(); 468var services = new ServiceCollection(); 480var services = new ServiceCollection(); 494var services = new ServiceCollection(); 514var services = new ServiceCollection(); 528var services = new ServiceCollection(); 589var services = new ServiceCollection();
SizeTests.cs (4)
32var services = new ServiceCollection(); 101var services = new ServiceCollection(); 154var services = new ServiceCollection(); 216var services = new ServiceCollection();
StampedeTests.cs (2)
17var services = new ServiceCollection(); 65var services = new ServiceCollection();
UnreliableL2Tests.cs (1)
128var services = new ServiceCollection();
Microsoft.Extensions.DependencyInjection (1)
Properties\TypeForwards.cs (1)
4[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(Microsoft.Extensions.DependencyInjection.ServiceCollection))]
Microsoft.Extensions.DependencyInjection.Abstractions (2)
ServiceCollection.cs (2)
138private readonly ServiceCollection _services; 140public ServiceCollectionDebugView(ServiceCollection services)
Microsoft.Extensions.DependencyInjection.AutoActivation.Tests (6)
AutoActivationExtensionsKeyedTests.cs (3)
18var serviceCollection = new ServiceCollection(); 44var serviceCollection = new ServiceCollection(); 67var serviceCollection = new ServiceCollection();
AutoActivationExtensionsTests.cs (3)
24var serviceCollection = new ServiceCollection(); 50var serviceCollection = new ServiceCollection(); 73var serviceCollection = new ServiceCollection();
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (9)
ApplicationLifecycleHealthChecksExtensionsTests.cs (3)
19var serviceCollection = new ServiceCollection(); 29var serviceCollection = new ServiceCollection(); 39var serviceCollection = new ServiceCollection();
ManualHealthCheckExtensionsTests.cs (3)
17var serviceCollection = new ServiceCollection(); 26var serviceCollection = new ServiceCollection(); 35var serviceCollection = new ServiceCollection();
TelemetryHealthChecksPublisherExtensionsTests.cs (3)
17var serviceCollection = new ServiceCollection(); 34var serviceCollection = new ServiceCollection(); 54var serviceCollection = new ServiceCollection();
Microsoft.Extensions.Diagnostics.HealthChecks.ResourceUtilization.Tests (22)
ResourceHealthCheckExtensionsTests.cs (22)
36var serviceCollection = new ServiceCollection(); 56var serviceCollection = new ServiceCollection(); 76var serviceCollection = new ServiceCollection(); 100var serviceCollection = new ServiceCollection(); 117var serviceCollection = new ServiceCollection(); 135var serviceCollection = new ServiceCollection(); 155var serviceCollection = new ServiceCollection(); 172var serviceCollection = new ServiceCollection(); 190var serviceCollection = new ServiceCollection(); 210var serviceCollection = new ServiceCollection(); 231var serviceCollection = new ServiceCollection(); 252var serviceCollection = new ServiceCollection(); 274var serviceCollection = new ServiceCollection(); 295var serviceCollection = new ServiceCollection(); 317var serviceCollection = new ServiceCollection(); 333var serviceCollection = new ServiceCollection(); 351var serviceCollection = new ServiceCollection(); 369var serviceCollection = new ServiceCollection(); 388var serviceCollection = new ServiceCollection(); 406var serviceCollection = new ServiceCollection(); 425var serviceCollection = new ServiceCollection(); 447var serviceCollection = new ServiceCollection();
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (4)
ResourceMonitoringExtensionsTests.cs (4)
26var services = new ServiceCollection(); 228var services = new ServiceCollection(); 243var services = new ServiceCollection(); 258var services = new ServiceCollection();
Microsoft.Extensions.Hosting (2)
HostApplicationBuilder.cs (1)
23private readonly ServiceCollection _serviceCollection = new();
HostBuilder.cs (1)
336var services = new ServiceCollection();
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (6)
HttpClientFactory.cs (6)
16var services = new ServiceCollection(); 40var services = new ServiceCollection(); 63var services = new ServiceCollection(); 90var services = new ServiceCollection(); 113var services = new ServiceCollection(); 136var services = new ServiceCollection();
Microsoft.Extensions.Http.Diagnostics.Tests (10)
Logging\HttpClientLoggingExtensionsTest.cs (7)
87var services = new ServiceCollection(); 110var services = new ServiceCollection(); 133var services = new ServiceCollection(); 164var services = new ServiceCollection(); 362var services = new ServiceCollection(); 485var services = new ServiceCollection(); 688var serviceCollection = new ServiceCollection();
Logging\HttpRequestReaderTest.cs (1)
927var services = new ServiceCollection();
TelemetryCommonExtensionsTests.cs (2)
63var serviceCollection = new ServiceCollection(); 87var serviceCollection = new ServiceCollection();
Microsoft.Extensions.Http.Resilience.PerformanceTests (3)
HttpClientFactory.cs (1)
36var services = new ServiceCollection();
RetryBenchmark.cs (1)
32var services = new ServiceCollection();
StandardResilienceBenchmark.cs (1)
32var services = new ServiceCollection();
Microsoft.Extensions.Http.Resilience.Tests (11)
Hedging\StandardHedgingTests.cs (1)
308var services = new ServiceCollection();
Resilience\GrpcResilienceTests.cs (1)
103var services = new ServiceCollection();
Resilience\HttpClientBuilderExtensionsTests.Resilience.cs (9)
29var services = new ServiceCollection(); 47var services = new ServiceCollection(); 67var services = new ServiceCollection(); 90var services = new ServiceCollection(); 170var services = new ServiceCollection(); 293var services = new ServiceCollection(); 301var services = new ServiceCollection(); 326var services = new ServiceCollection(); 342var services = new ServiceCollection();
Microsoft.Extensions.Logging (1)
LoggerFactory.cs (1)
114var serviceCollection = new ServiceCollection();
Microsoft.Extensions.Resilience.PerformanceTests (1)
ResilienceEnrichmentBenchmark.cs (1)
40var services = new ServiceCollection();
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (7)
Resolver\LoopbackDnsTestBase.cs (1)
42ServiceCollection services = new();
ServiceDiscoveryDnsServiceCollectionExtensionsTests.cs (6)
20var services = new ServiceCollection(); 32var services = new ServiceCollection(); 44var services = new ServiceCollection(); 57var services = new ServiceCollection(); 70var services = new ServiceCollection(); 83var services = new ServiceCollection();
Microsoft.Extensions.ServiceDiscovery.Tests (4)
ExtensionsServicePublicApiTests.cs (3)
56var services = new ServiceCollection(); 91var services = new ServiceCollection(); 126var services = new ServiceCollection();
ServiceEndpointResolverTests.cs (1)
59var serviceCollection = new ServiceCollection();
Microsoft.Extensions.Telemetry.Abstractions.Tests (2)
Enrichment\EnricherExtensionsTests.cs (2)
36var services = new ServiceCollection(); 55var services = new ServiceCollection();
Microsoft.Extensions.Telemetry.PerformanceTests (1)
ExtendedLoggerBench.cs (1)
69var serviceCollection = new ServiceCollection();
Microsoft.Extensions.Telemetry.Tests (12)
Latency\LatencyConsoleExtensionsTests.cs (1)
19var s = new ServiceCollection();
Logging\Utils.cs (1)
13var serviceCollection = new ServiceCollection();
Sampling\SamplingLoggerBuilderExtensionsTests.cs (10)
23var serviceCollection = new ServiceCollection(); 39var serviceCollection = new ServiceCollection(); 64var serviceCollection = new ServiceCollection(); 117var serviceCollection = new ServiceCollection(); 159var serviceCollection = new ServiceCollection(); 176var serviceCollection = new ServiceCollection(); 199var serviceCollection = new ServiceCollection(); 218var serviceCollection = new ServiceCollection(); 236var serviceCollection = new ServiceCollection(); 251var serviceCollection = new ServiceCollection();
Microsoft.Gen.Logging.Generated.Tests (1)
Utils.cs (1)
71var serviceCollection = new ServiceCollection();
Microsoft.Maui (1)
Hosting\MauiAppBuilder.cs (1)
17 private readonly ServiceCollection _services = new();