Implemented interface member:
property
Services
Microsoft.Extensions.Hosting.IHost.Services
561 references to Services
Aspire.Hosting (2)
DistributedApplication.cs (1)
235/// exposes a <see cref="Services"/> property which allows developers to get services from the
DistributedApplicationBuilder.cs (1)
574_executionContextOptions.ServiceProvider = application.Services.GetRequiredService<IServiceProvider>();
Aspire.Hosting.Azure.Kusto.Tests (7)
KustoFunctionalTests.cs (7)
55var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 106var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 185var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 189var snapshot = app.Services.GetRequiredService<FakeLogCollector>().GetSnapshot(); 212var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 220var snapshot = app.Services.GetRequiredService<FakeLogCollector>().GetSnapshot(); 251var rns = app.Services.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Azure.Tests (143)
AzureAIFoundryExtensionsTests.cs (3)
89var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 94var foundryManager = app.Services.GetRequiredService<FoundryLocalManager>(); 171var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureAppConfigurationExtensionsTests.cs (1)
23var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureAppServiceTests.cs (11)
36var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 65var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 99var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 136var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 164var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 202var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 239var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 280var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 389var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 411var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 442var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureBicepProvisionerTests.cs (2)
59var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 63var rns = app.Services.GetRequiredService<ResourceNotificationService>();
AzureBicepResourceTests.cs (1)
81var eventingServices = app.Services.GetServices<IDistributedApplicationEventingSubscriber>();
AzureContainerAppsTests.cs (50)
37var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 71var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 101var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 143var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 175var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 219var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 249var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 320var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 397var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 438var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 468var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 504var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 540var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 578var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 618var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 650var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 683var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 734var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 816var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 859var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 890var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 922var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 951var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 988var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1032var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1073var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1111var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1132var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1151var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1171var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1190var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1209var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1227var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1258var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1314var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1365var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1435var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1457var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1487var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1533var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1652var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1674var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1711var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1752var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1792var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1822var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1860var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1900var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1940var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1977var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureContainerRegistryTests.cs (3)
28var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 50var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 86var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureCosmosDBEmulatorFunctionalTests.cs (3)
172var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 220var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 289var rns = app.Services.GetRequiredService<ResourceNotificationService>();
AzureCosmosDBExtensionsTests.cs (3)
202var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 296var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 333var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureDeployerTests.cs (11)
151var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 202var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 250var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 307var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 397var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 575var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 623var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 831var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 1001var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 1091var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 1123var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>();
AzureEventHubsExtensionsTests.cs (4)
289var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 353var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 414var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 488var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None);
AzureFunctionsTests.cs (7)
160var model = host.Services.GetRequiredService<DistributedApplicationModel>(); 186var model = host.Services.GetRequiredService<DistributedApplicationModel>(); 284var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 316var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 343var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 371var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 401var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureKeyVaultTests.cs (1)
35var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureKustoExtensionsTests.cs (1)
24var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureOpenAIExtensionsTests.cs (1)
60var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzurePostgresExtensionsTests.cs (2)
36var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 59var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureProvisioningResourceTests.cs (3)
36var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 70var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 103var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureRedisEnterpriseExtensionsTests.cs (1)
39var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureRedisExtensionsTests.cs (2)
38var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 58var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureResourcePreparerTests.cs (3)
61var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 107var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 151var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureSearchExtensionsTests.cs (1)
40var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureServiceBusExtensionsTests.cs (6)
135var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 369var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 468var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 524var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 583var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 726var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureSignalRExtensionsTests.cs (2)
21var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 43var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureStorageEmulatorFunctionalTests.cs (6)
47var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 92var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 135var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 188var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 222var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 261var rns = app.Services.GetRequiredService<ResourceNotificationService>();
AzureStorageExtensionsTests.cs (1)
635var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureUserAssignedIdentityTests.cs (7)
30var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 49var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 70var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 115var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 152var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 207var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 283var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureWebPubSubExtensionsTests.cs (1)
287var model = app.Services.GetRequiredService<DistributedApplicationModel>();
ContainerRegistryTests.cs (4)
29var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 59var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 97var publisher = app.Services.GetRequiredKeyedService<IDistributedApplicationPublisher>("test-publisher") as ContainerRegistryValidatingPublisher; 99var model = app.Services.GetRequiredService<DistributedApplicationModel>();
ExistingAzureResourceTests.cs (1)
78var model = app.Services.GetRequiredService<DistributedApplicationModel>();
RoleAssignmentTests.cs (1)
237var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Containers.Tests (15)
ContainerResourceTests.cs (10)
21var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 40var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 59var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 79var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 170var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 204var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 232var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 251var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 300var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 347var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
WithDockerfileTests.cs (5)
78var collector = app.Services.GetFakeLogCollector(); 209var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 242var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 471var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 542var kubernetes = app.Services.GetRequiredService<IKubernetesService>();
Aspire.Hosting.Docker.Tests (1)
DockerComposePublisherTests.cs (1)
186var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
Aspire.Hosting.Garnet.Tests (6)
AddGarnetTests.cs (6)
22var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 50var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 79var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 343var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 364var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 381var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Kafka.Tests (2)
AddKafkaTests.cs (2)
22var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 64var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Keycloak.Tests (3)
KeycloakPublicApiTests.cs (2)
167var entries = await containerAnnotation.Callback(new() { Model = keycloakResource, ServiceProvider = app.Services }, CancellationToken.None); 194var entries = await containerAnnotation.Callback(new() { Model = keycloakResource, ServiceProvider = app.Services }, CancellationToken.None);
KeycloakResourceBuilderTests.cs (1)
23var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Milvus.Tests (3)
AddMilvusTests.cs (3)
25var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 55var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 184var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.MongoDB.Tests (3)
AddMongoDBTests.cs (3)
23var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 51var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 82var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.MySql.Tests (9)
AddMySqlTests.cs (8)
43var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 82var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 120var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 139var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 243await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 271var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 274builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 363var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
MySqlFunctionalTests.cs (1)
578var rns = app.Services.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Nats.Tests (4)
AddNatsTests.cs (4)
48var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 81var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 99var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 141var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Oracle.Tests (5)
AddOracleTests.cs (5)
42var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 81var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 119var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 139var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 162var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.PostgreSQL.Tests (9)
AddPostgresTests.cs (8)
52var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 106var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 176var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 198var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 379var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 478var entries = await createServers.Callback(new() { Model = pgadmin, ServiceProvider = app.Services }, CancellationToken.None); 532var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 542var entries = await createBookmarks.Callback(new() { Model = pgweb, ServiceProvider = app.Services }, CancellationToken.None);
PostgresFunctionalTests.cs (1)
562var rns = app.Services.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Python.Tests (10)
AddPythonAppTests.cs (10)
151var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 187var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 229var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 396var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 429var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 490var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 518var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 540var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 561var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 597var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Qdrant.Tests (4)
AddQdrantTests.cs (4)
45var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 84var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 117var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 283var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.RabbitMQ.Tests (3)
AddRabbitMQTests.cs (3)
50var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 102var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 141var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Redis.Tests (15)
AddRedisTests.cs (10)
30var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 58var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 89var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 106var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 121var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 467var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 496await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 522await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 543await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 695var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
RedisFunctionalTests.cs (5)
144var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 476var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 511var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 612var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 622var clientFactory = app.Services.GetRequiredService<IHttpClientFactory>();
Aspire.Hosting.Seq.Tests (6)
AddSeqTests.cs (6)
21var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 49var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 78var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 175var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 208var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 238var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.SqlServer.Tests (4)
AddSqlServerTests.cs (4)
43var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 90var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 112var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 276var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Testing (6)
DistributedApplicationFactory.cs (2)
172_shutdownTimeout = application.Services.GetService<IOptions<HostOptions>>()?.Value.ShutdownTimeout ?? _shutdownTimeout; 428_hostApplicationLifetime = app.Services.GetService<IHostApplicationLifetime>()
DistributedApplicationHostingTestingExtensions.cs (3)
28var clientFactory = app.Services.GetRequiredService<IHttpClientFactory>(); 77var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 118var lifetime = app.Services.GetRequiredService<IHostApplicationLifetime>();
DistributedApplicationTestingBuilder.cs (1)
290public IServiceProvider Services => innerApp.Services;
Aspire.Hosting.Testing.Tests (11)
TestingBuilderTests.cs (4)
102var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 164var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 401var hostEnvironment = app.Services.GetRequiredService<IHostEnvironment>(); 417var config = app.Services.GetRequiredService<IConfiguration>();
TestingFactoryTests.cs (3)
43var appModel = _app.Services.GetRequiredService<DistributedApplicationModel>(); 65var appModel = _app.Services.GetRequiredService<IHostEnvironment>(); 74var config = _app.Services.GetRequiredService<IConfiguration>();
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (4)
35var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 78var hostApplicationLifetime = app.Services.GetRequiredService<IHostApplicationLifetime>(); 124var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 125var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
Aspire.Hosting.Tests (272)
AddConnectionStringTests.cs (2)
26var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 55var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AddParameterTests.cs (11)
25var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 57var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 93var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 145var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 204var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 273var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 305var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 520var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 544var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 567var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 593var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AppHostSmokeTests.cs (1)
93var dcpOptions = host.Services.GetRequiredService<IOptions<DcpOptions>>();
AspireStoreTests.cs (3)
36var store = app.Services.GetRequiredService<IAspireStore>(); 60var store = app.Services.GetRequiredService<IAspireStore>(); 134return app.Services.GetRequiredService<IAspireStore>();
Backchannel\Exec\ExecTestsBase.cs (1)
28var appHostRpcTarget = app.Services.GetRequiredService<AppHostRpcTarget>();
Codespaces\CodespacesUrlRewriterTests.cs (1)
34var collector = app.Services.GetFakeLogCollector();
Dashboard\DashboardOptionsTests.cs (1)
31var dashboardOptions = app.Services.GetRequiredService<IOptions<DashboardOptions>>().Value;
Dashboard\DashboardResourceTests.cs (17)
45var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 73var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 106var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 180var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 221var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 260var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 296var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 334var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 345var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.Services).DefaultTimeout(); 380var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 386var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.Services).DefaultTimeout(); 407var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 423var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 474var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 488var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 489var resourceNotificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 540var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Dcp\DcpCliArgsTests.cs (1)
54var dcpOptions = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value;
Dcp\DcpExecutorTests.cs (49)
37var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 62var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 146var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 189var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 238var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 270var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 302var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 335var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 372var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 392var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 426var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 460var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 524var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 546var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 582var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 682var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 792var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 837var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 874var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 909var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 969var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 990var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1026var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1063var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1100var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1130var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1167var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1189var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1224var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1264var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1288var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1323var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1359var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1399var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1430var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1461var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1491var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1520var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1568var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1613var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1650var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1691var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1727var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1769var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1811var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1853var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1890var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1927var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1970var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Dcp\DcpHostNotificationTests.cs (6)
48var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 97var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 152var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 207var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 257var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 321var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>();
DistributedApplicationBuilderTests.cs (10)
39Assert.NotNull(app.Services.GetRequiredKeyedService<IDistributedApplicationPublisher>("manifest")); 41var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 44var eventingSubscribers = app.Services.GetServices<IDistributedApplicationEventingSubscriber>(); 51var options = app.Services.GetRequiredService<IOptions<PublishingOptions>>(); 63var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 74var publishOptions = app.Services.GetRequiredService<IOptions<PublishingOptions>>(); 87var publishOptions = app.Services.GetRequiredService<IOptions<PublishingOptions>>(); 99var config = app.Services.GetRequiredService<IConfiguration>(); 109var config = app.Services.GetRequiredService<IConfiguration>(); 122var config = app.Services.GetRequiredService<IConfiguration>();
DistributedApplicationModelExtensionsTests.cs (1)
26var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
DistributedApplicationTests.cs (46)
133var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 134var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 135var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 176var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 177var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 178var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 251var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 252var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 253var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 328var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 329var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 330var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 488var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 546var s = app.Services.GetRequiredService<IKubernetesService>(); 604var s = app.Services.GetRequiredService<IKubernetesService>(); 640var events = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 647var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 648var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 649var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 690var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 691var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 692var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 734var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 738var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 785var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 789var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 819var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 823var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 859var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 863var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 894var s = app.Services.GetRequiredService<IKubernetesService>(); 896var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 923var s = app.Services.GetRequiredService<IKubernetesService>(); 925var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 952var s = app.Services.GetRequiredService<IKubernetesService>(); 954var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 982var s = app.Services.GetRequiredService<IKubernetesService>(); 984var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1008var s = app.Services.GetRequiredService<IKubernetesService>(); 1068var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1087var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1229var s = app.Services.GetRequiredService<IKubernetesService>(); 1283var s = app.Services.GetRequiredService<IKubernetesService>(); 1350var s = app.Services.GetRequiredService<IKubernetesService>(); 1377var s = app.Services.GetRequiredService<IKubernetesService>(); 1379var lifecycles = app.Services.GetServices<IDistributedApplicationLifecycleHook>();
Eventing\DistributedApplicationBuilderEventingTests.cs (3)
168var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 293var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 302var testEvent = new ResourceStoppedEvent(resource.Resource, app.Services, testResourceEvent);
ExternalServiceTests.cs (4)
167var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, DistributedApplicationOperation.Publish, app.Services).DefaultTimeout(); 381var healthCheckService = app.Services.GetService<HealthCheckService>(); 402var healthCheckService = app.Services.GetService<HealthCheckService>(); 419var healthCheckService = app.Services.GetRequiredService<HealthCheckService>();
Health\ResourceHealthCheckServiceTests.cs (6)
158var healthService = app.Services.GetRequiredService<ResourceHealthCheckService>(); 221var logger = app.Services.GetRequiredService<ILogger<ResourceHealthCheckServiceTests>>(); 222var rhcs = app.Services.GetRequiredService<ResourceHealthCheckService>(); 261var logger = app.Services.GetRequiredService<ILogger<ResourceHealthCheckServiceTests>>(); 262var rhcs = app.Services.GetRequiredService<ResourceHealthCheckService>(); 482var rhcs = app.Services.GetRequiredService<ResourceHealthCheckService>();
HealthCheckTests.cs (2)
101var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 139var collector = app.Services.GetFakeLogCollector();
Helpers\JsonDocumentManifestPublisher.cs (1)
44var publisher = testProgram.App?.Services.GetRequiredKeyedService<IDistributedApplicationPublisher>("manifest") as JsonDocumentManifestPublisher;
KestrelConfigTests.cs (1)
359var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
ManifestGenerationTests.cs (1)
120var publisher = program.Services.GetManifestPublisher();
Orchestrator\ApplicationOrchestratorTests.cs (15)
32var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 79var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 124var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 174var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 241var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 293var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 345var e = Assert.Throws<InvalidOperationException>(() => app.Services.GetService<ApplicationOrchestrator>()); 363var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 407var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 436await applicationEventing.PublishAsync(new ConnectionStringAvailableEvent(resource.Resource, app.Services), CancellationToken.None); 583var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 629var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 677var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 733var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 787var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Orchestrator\ParameterProcessorTests.cs (11)
494var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 519var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 539var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 565var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 588var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 610var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 635var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 666var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 704var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 708var parameterProcessor = app.Services.GetRequiredService<ParameterProcessor>(); 737var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Orchestrator\RelationshipEvaluatorTests.cs (5)
28var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 60var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 83var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 106var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 129var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
ProjectResourceTests.cs (19)
71var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 190var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 217var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 235var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 251var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 301var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 321var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 364var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 386var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 411var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 441var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 460var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 484var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 534var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 636var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 667var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 685var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 703var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 722var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\ResourceContainerImageBuilderTests.cs (35)
35var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 39var collector = app.Services.GetFakeLogCollector(); 66var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 70var collector = app.Services.GetFakeLogCollector(); 104var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 108var collector = app.Services.GetFakeLogCollector(); 142var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 146var collector = app.Services.GetFakeLogCollector(); 176var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 180var collector = app.Services.GetFakeLogCollector(); 214var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 218var collector = app.Services.GetFakeLogCollector(); 255var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 259var collector = app.Services.GetFakeLogCollector(); 294var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 298var collector = app.Services.GetFakeLogCollector(); 330var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 334var collector = app.Services.GetFakeLogCollector(); 359var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 365var collector = app.Services.GetFakeLogCollector(); 410var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 416var collector = app.Services.GetFakeLogCollector(); 437var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 463var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 485var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 506var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 536var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 568var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 600var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 637var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 644var collector = app.Services.GetFakeLogCollector(); 683var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 687var collector = app.Services.GetFakeLogCollector(); 756var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 831var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>();
PublishingTests.cs (3)
179var publishingOptions = app.Services.GetRequiredService<IOptions<PublishingOptions>>(); 190var publishingOptions = app.Services.GetRequiredService<IOptions<PublishingOptions>>(); 201var publishingOptions = app.Services.GetRequiredService<IOptions<PublishingOptions>>();
Schema\SchemaTests.cs (1)
226var publisher = program.Services.GetManifestPublisher();
Utils\LoggerNotificationExtensions.cs (4)
35var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 78var hostApplicationLifetime = app.Services.GetRequiredService<IHostApplicationLifetime>(); 124var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 125var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
WaitForTests.cs (1)
575var collector = app.Services.GetFakeLogCollector();
WithEndpointTests.cs (1)
209var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
WithEnvironmentTests.cs (1)
29var serviceProvider = app.Services.GetRequiredService<IServiceProvider>();
WithHttpCommandTests.cs (1)
30var httpClientFactory = app.Services.GetService<IHttpClientFactory>();
WithOtlpExporterTests.cs (2)
40var serviceProvider = app.Services.GetRequiredService<IServiceProvider>(); 63var serviceProvider = app.Services.GetRequiredService<IServiceProvider>();
WithUrlsTests.cs (5)
326var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 362var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 405var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 490var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 616var rns = app.Services.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Valkey.Tests (6)
AddValkeyTests.cs (6)
22var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 50var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 79var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 98var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 115var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 333var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Playground.Tests (11)
AppHostTests.cs (1)
68var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Infrastructure\DistributedApplicationExtensions.cs (6)
104var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 114var environment = app.Services.GetRequiredService<IHostEnvironment>(); 115var logCollector = app.Services.GetFakeLogCollector(); 132var environment = app.Services.GetRequiredService<IHostEnvironment>(); 133var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 212var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(TryApplyEfMigrationsAsync));
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (4)
35var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 78var hostApplicationLifetime = app.Services.GetRequiredService<IHostApplicationLifetime>(); 124var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 125var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
TestingAppHost1.AppHost (1)
Program.cs (1)
59var notifications = app.Services.GetRequiredService<ResourceNotificationService>();