Implemented interface member:
property
Services
Microsoft.Extensions.Hosting.IHost.Services
755 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)
719_executionContextOptions.ServiceProvider = application.Services.GetRequiredService<IServiceProvider>();
Aspire.Hosting.Azure.Kusto.Tests (7)
KustoFunctionalTests.cs (7)
55var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 107var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 187var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 191var snapshot = app.Services.GetRequiredService<FakeLogCollector>().GetSnapshot(); 214var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 222var snapshot = app.Services.GetRequiredService<FakeLogCollector>().GetSnapshot(); 253var rns = app.Services.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Azure.Tests (166)
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 (23)
37var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 66var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 100var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 137var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 165var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 203var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 240var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 281var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 390var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 412var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 443var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 479var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 515var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 550var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 624var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 655var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 702var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 723var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 745var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 767var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 793var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 824var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 856var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureBicepProvisionerTests.cs (2)
64var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 68var rns = app.Services.GetRequiredService<ResourceNotificationService>();
AzureBicepResourceTests.cs (1)
82var eventingServices = app.Services.GetServices<IDistributedApplicationEventingSubscriber>();
AzureContainerAppsTests.cs (55)
40var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 74var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 104var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 146var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 178var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 222var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 252var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 326var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 403var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 444var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 474var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 510var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 546var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 584var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 624var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 656var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 689var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 740var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 822var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 865var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 896var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 928var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 957var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 994var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1038var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1079var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1117var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1138var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1157var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1177var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1196var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1215var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1233var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1264var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1320var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1371var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1441var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1463var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1493var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1539var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1658var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1680var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1717var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1758var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1798var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1828var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1866var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1906var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1946var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1991var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2021var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2069var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2093var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2117var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2156var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureContainerRegistryTests.cs (3)
29var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 51var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 87var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureCosmosDBEmulatorFunctionalTests.cs (3)
173var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 221var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 291var 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 (13)
177var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 234var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 297var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 360var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 426var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 542var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 722var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 781var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 1006var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 1294var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 1383var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 1415var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 1478var 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 (8)
160var model = host.Services.GetRequiredService<DistributedApplicationModel>(); 186var model = host.Services.GetRequiredService<DistributedApplicationModel>(); 285var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 318var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 346var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 375var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 406var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 727var model = host.Services.GetRequiredService<DistributedApplicationModel>();
AzureKeyVaultTests.cs (1)
36var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureKustoExtensionsTests.cs (1)
24var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureManagedRedisExtensionsTests.cs (1)
37var 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>();
AzureRedisExtensionsTests.cs (2)
39var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 59var 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); 525var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 584var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 727var 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>(); 189var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 223var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 263var rns = app.Services.GetRequiredService<ResourceNotificationService>();
AzureStorageExtensionsTests.cs (1)
635var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureUserAssignedIdentityTests.cs (7)
29var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 48var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 69var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 115var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 152var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 208var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 285var 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)
76var model = app.Services.GetRequiredService<DistributedApplicationModel>();
RoleAssignmentTests.cs (4)
236var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 265var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 295var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 317var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Containers.Tests (17)
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>(); 180var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 214var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 242var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 261var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 310var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 357var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
WithDockerfileTests.cs (7)
81var collector = app.Services.GetFakeLogCollector(); 212var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 245var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 474var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 545var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 933var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 974var appModel1 = app1.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Docker.Tests (1)
DockerComposePublisherTests.cs (1)
185var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() 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.JavaScript.Tests (39)
AddNodeAppTests.cs (3)
237var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 264var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 294var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AddViteAppTests.cs (7)
242var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 267var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 299var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 359var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 410var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 463var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 524var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AddViteAppWithPnpmTests.cs (3)
21var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 55var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 86var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
IntegrationTests.cs (2)
25var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 67var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
PackageInstallationTests.cs (16)
32var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 64var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 88var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 127var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 157var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 196var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 225var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 249var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 270var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 294var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 324var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 352var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 379var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 401var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 423var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 443var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
ResourceCreationTests.cs (8)
20var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 38var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 56var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 76var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 99var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 136var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 171var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 203var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Kafka.Tests (4)
AddKafkaTests.cs (4)
24var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 66var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 213var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 218new BeforeResourceStartedEvent(kafkaUiResource, app.Services),
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.Maui.Tests (2)
MauiPlatformExtensionsTests.cs (2)
249await app.Services.GetRequiredService<IDistributedApplicationEventing>() 250.PublishAsync(new BeforeResourceStartedEvent(platform.Resource, app.Services), CancellationToken.None);
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 (4)
AddMongoDBTests.cs (4)
23var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 51var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 82var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 300var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.MySql.Tests (11)
AddMySqlTests.cs (10)
44var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 83var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 121var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 140var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 244await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 272var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 275builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 364var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 380var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 385new BeforeResourceStartedEvent(phpMyAdminResource, app.Services),
MySqlFunctionalTests.cs (1)
582var 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)
564var rns = app.Services.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Python.Tests (51)
AddPythonAppTests.cs (51)
155var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 194var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 237var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 414var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 447var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 508var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 538var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 571var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 616var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 650var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 689var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 723var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 754var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 774var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 813var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 832var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 857var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 888var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 913var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 932var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 951var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 972var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1008var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1042var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1074var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1098var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1120var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1146var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1401var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1439var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1479var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1516var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1872var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1907var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1961var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1982var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2009var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2037var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2061var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2093var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2136var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2166var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2202var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2238var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2267var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2299var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2329var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2362var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2389var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2390var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 2391await eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel), CancellationToken.None);
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 (20)
AddRedisTests.cs (15)
35var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 63var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 94var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 111var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 126var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 472var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 501await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 527await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 548await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 700var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 720var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 815var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 818var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 832var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 835var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
RedisFunctionalTests.cs (5)
151var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 488var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 523var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 624var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 634var 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>(); 95var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 136var lifetime = app.Services.GetRequiredService<IHostApplicationLifetime>();
DistributedApplicationTestingBuilder.cs (1)
300public IServiceProvider Services => innerApp.Services;
Aspire.Hosting.Testing.Tests (11)
TestingBuilderTests.cs (4)
105var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 167var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 409var hostEnvironment = app.Services.GetRequiredService<IHostEnvironment>(); 425var 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 (345)
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)
91var dcpOptions = host.Services.GetRequiredService<IOptions<DcpOptions>>();
AspireStoreTests.cs (3)
37var store = app.Services.GetRequiredService<IAspireStore>(); 61var store = app.Services.GetRequiredService<IAspireStore>(); 138return app.Services.GetRequiredService<IAspireStore>();
Backchannel\AuxiliaryBackchannelTests.cs (6)
37var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 80var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 125var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 163var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 207var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 254var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>();
Backchannel\Exec\ExecTestsBase.cs (1)
28var appHostRpcTarget = app.Services.GetRequiredService<AppHostRpcTarget>();
Codespaces\CodespacesUrlRewriterTests.cs (1)
34var collector = app.Services.GetFakeLogCollector();
ContainerRegistryResourceTests.cs (29)
139var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 154var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 170var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 186var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 290var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 515var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 521var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 539var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 542var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 563var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 566var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 585var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 588var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 608var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 611var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 644var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 647var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 668var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 671var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 695var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 701var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 719var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 722var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 739var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 742var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 760var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 763var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 781var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 784var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
Dashboard\DashboardOptionsTests.cs (1)
31var dashboardOptions = app.Services.GetRequiredService<IOptions<DashboardOptions>>().Value;
Dashboard\DashboardResourceTests.cs (18)
45var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 73var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 107var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 214var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 248var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 289var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 328var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 364var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 402var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 413var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.Services).DefaultTimeout(); 448var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 454var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.Services).DefaultTimeout(); 475var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 491var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 542var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 556var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 557var resourceNotificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 608var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Dcp\DcpCliArgsTests.cs (1)
54var dcpOptions = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value;
Dcp\DcpExecutorTests.cs (51)
39var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 64var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 148var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 190var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 239var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 271var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 303var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 336var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 373var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 393var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 427var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 461var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 525var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 547var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 583var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 687var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 767var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 861var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 906var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 943var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 978var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1038var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1059var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1095var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1132var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1169var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1199var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1236var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1258var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1293var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1333var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1357var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1392var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1428var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1468var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1499var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1530var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1560var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1589var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1637var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1687var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1724var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1765var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1801var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1843var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1885var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1927var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1964var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2001var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2044var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2074var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Dcp\DcpHostNotificationTests.cs (6)
56var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 105var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 160var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 215var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 265var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 333var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>();
DistributedApplicationBuilderTests.cs (9)
41var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 44var eventingSubscribers = app.Services.GetServices<IDistributedApplicationEventingSubscriber>(); 51var options = app.Services.GetRequiredService<IOptions<PipelineOptions>>(); 62var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 73var pipelineOptions = app.Services.GetRequiredService<IOptions<PipelineOptions>>(); 84var pipelineOptions = app.Services.GetRequiredService<IOptions<PipelineOptions>>(); 95var config = app.Services.GetRequiredService<IConfiguration>(); 105var config = app.Services.GetRequiredService<IConfiguration>(); 118var config = app.Services.GetRequiredService<IConfiguration>();
DistributedApplicationModelExtensionsTests.cs (2)
26var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 61var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
DistributedApplicationTests.cs (58)
136var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 137var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 138var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 181var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 182var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 183var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 273var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 316var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 317var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 390var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 391var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 392var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 469var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 470var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 471var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 631var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 688var s = app.Services.GetRequiredService<IKubernetesService>(); 745var s = app.Services.GetRequiredService<IKubernetesService>(); 789var s = app.Services.GetRequiredService<IKubernetesService>(); 863var s = app.Services.GetRequiredService<IKubernetesService>(); 864var dc = app.Services.GetRequiredService<IDeveloperCertificateService>(); 957var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 958var s = app.Services.GetRequiredService<IKubernetesService>(); 995var s = app.Services.GetRequiredService<IKubernetesService>(); 996var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1035var s = app.Services.GetRequiredService<IKubernetesService>(); 1036var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1064var events = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 1071var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1072var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 1073var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1112var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1113var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 1114var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1157var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1161var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1206var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1210var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1238var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1242var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1276var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1280var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1310var s = app.Services.GetRequiredService<IKubernetesService>(); 1312var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1338var s = app.Services.GetRequiredService<IKubernetesService>(); 1340var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1366var s = app.Services.GetRequiredService<IKubernetesService>(); 1368var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1395var s = app.Services.GetRequiredService<IKubernetesService>(); 1397var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1420var s = app.Services.GetRequiredService<IKubernetesService>(); 1479var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1497var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1638var s = app.Services.GetRequiredService<IKubernetesService>(); 1706var s = app.Services.GetRequiredService<IKubernetesService>(); 1791var s = app.Services.GetRequiredService<IKubernetesService>(); 1818var s = app.Services.GetRequiredService<IKubernetesService>(); 1820var 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)
172var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, DistributedApplicationOperation.Publish, app.Services).DefaultTimeout(); 404var healthCheckService = app.Services.GetService<HealthCheckService>(); 425var healthCheckService = app.Services.GetService<HealthCheckService>(); 442var 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>(); 138var collector = app.Services.GetFakeLogCollector();
KestrelConfigTests.cs (1)
353var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Orchestrator\ApplicationOrchestratorTests.cs (15)
37var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 85var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 131var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 182var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 250var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 303var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 355var e = Assert.Throws<InvalidOperationException>(() => app.Services.GetService<ApplicationOrchestrator>()); 374var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 419var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 448await applicationEventing.PublishAsync(new ConnectionStringAvailableEvent(resource.Resource, app.Services), CancellationToken.None); 602var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 649var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 698var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 755var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 810var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Orchestrator\ParameterProcessorTests.cs (11)
495var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 520var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 540var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 566var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 589var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 611var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 636var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 667var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 705var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 709var parameterProcessor = app.Services.GetRequiredService<ParameterProcessor>(); 738var 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>();
Pipelines\DistributedApplicationPipelineTests.cs (4)
939app.Services.GetRequiredService<DistributedApplicationModel>(), 940app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 941app.Services, 942app.Services.GetRequiredService<ILogger<DistributedApplicationPipelineTests>>(),
ProjectResourceTests.cs (23)
81var 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>(); 532var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 632var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 663var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 681var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 699var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 718var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 736var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 781var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 814var fakeContainerRuntime = (FakeContainerRuntime)app.Services.GetRequiredService<IContainerRuntime>(); 829var mockImageBuilder = (MockImageBuilder)app.Services.GetRequiredService<IResourceContainerImageManager>();
Publishing\ResourceContainerImageManagerTests.cs (55)
37var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 41var collector = app.Services.GetFakeLogCollector(); 69var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 73var collector = app.Services.GetFakeLogCollector(); 101var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 105var collector = app.Services.GetFakeLogCollector(); 138var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 142var collector = app.Services.GetFakeLogCollector(); 172var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 176var collector = app.Services.GetFakeLogCollector(); 202var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 206var collector = app.Services.GetFakeLogCollector(); 239var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 243var collector = app.Services.GetFakeLogCollector(); 279var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 283var collector = app.Services.GetFakeLogCollector(); 314var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 318var collector = app.Services.GetFakeLogCollector(); 346var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 350var collector = app.Services.GetFakeLogCollector(); 375var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 381var collector = app.Services.GetFakeLogCollector(); 426var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 432var collector = app.Services.GetFakeLogCollector(); 455var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 479var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 514var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 545var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 577var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 614var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 622var collector = app.Services.GetFakeLogCollector(); 661var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 665var collector = app.Services.GetFakeLogCollector(); 733var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 828var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 867var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 869app.Services, 906var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 908app.Services, 933var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 935app.Services, 960var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 962app.Services, 1009var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1011app.Services, 1040var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1042app.Services, 1073var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1075app.Services, 1082Assert.Equal(app.Services, capturedServices); 1113var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1161var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1194var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1237var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1270var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>();
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)
576var 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 (6)
379var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 406var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 439var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 468var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 586var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 669var 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.Hosting.Yarp.Tests (4)
AddYarpTests.cs (4)
289Services = app.Services, 320Services = app.Services, 352Services = app.Services, 390Services = app.Services,
Aspire.Playground.Tests (11)
AppHostTests.cs (1)
68var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Infrastructure\DistributedApplicationExtensions.cs (6)
105var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 115var environment = app.Services.GetRequiredService<IHostEnvironment>(); 116var logCollector = app.Services.GetFakeLogCollector(); 133var environment = app.Services.GetRequiredService<IHostEnvironment>(); 134var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 213var 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)
64var notifications = app.Services.GetRequiredService<ResourceNotificationService>();