Implemented interface member:
property
Services
Microsoft.Extensions.Hosting.IHost.Services
673 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)
694_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 (160)
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 (22)
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>(); 468var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 500var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 536var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 571var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 625var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 656var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 703var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 724var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 746var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 768var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 794var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureBicepProvisionerTests.cs (2)
63var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 67var rns = app.Services.GetRequiredService<ResourceNotificationService>();
AzureBicepResourceTests.cs (1)
83var eventingServices = app.Services.GetServices<IDistributedApplicationEventingSubscriber>();
AzureContainerAppsTests.cs (51)
38var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 72var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 102var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 144var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 176var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 220var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 250var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 324var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 401var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 442var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 472var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 508var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 544var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 582var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 622var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 654var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 687var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 738var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 820var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 863var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 894var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 926var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 955var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 992var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1036var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1077var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1115var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1136var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1155var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1175var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1194var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1213var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1231var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1262var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1318var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1369var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1439var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1461var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1491var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1537var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1656var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1678var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1715var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1756var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1796var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1826var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1864var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1904var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1944var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1989var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2019var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureContainerRegistryTests.cs (3)
26var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 48var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 84var 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 (12)
161var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 202var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 251var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 300var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 358var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 464var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 642var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 687var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 898var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 1171var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 1260var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 1292var 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>(); 728var model = host.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); 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>(); 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)
29var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 48var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 69var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 114var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 151var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 206var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 282var 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 (4)
237var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 266var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 296var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 318var 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>(); 928var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 965var appModel1 = app1.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Docker.Tests (1)
DockerComposePublisherTests.cs (1)
181var 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.JavaScript.Tests (31)
AddNodeAppTests.cs (3)
237var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 264var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 294var 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>(); 59var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 83var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 122var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 149var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 188var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 214var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 238var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 259var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 283var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 310var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 338var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 365var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 387var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 409var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 429var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
ResourceCreationTests.cs (7)
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>();
Aspire.Hosting.Kafka.Tests (4)
AddKafkaTests.cs (4)
23var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 65var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 212var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 217new 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)
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 (48)
AddPythonAppTests.cs (48)
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>(); 834var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 865var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 890var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 909var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 928var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 949var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 985var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1019var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1051var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1075var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1097var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1123var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1378var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1416var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1456var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1493var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1849var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1884var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1938var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1959var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1986var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2014var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2038var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2070var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2113var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2143var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2179var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2215var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2244var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2276var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2297var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2298var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 2299await 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)
150var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 482var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 517var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 618var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 628var 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)
296public IServiceProvider Services => innerApp.Services;
Aspire.Hosting.Testing.Tests (11)
TestingBuilderTests.cs (4)
105var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 167var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 404var hostEnvironment = app.Services.GetRequiredService<IHostEnvironment>(); 420var 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 (280)
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 (18)
45var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 73var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 107var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 209var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 243var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 284var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 323var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 359var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 397var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 408var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.Services).DefaultTimeout(); 443var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 449var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.Services).DefaultTimeout(); 470var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 486var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 537var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 551var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 552var resourceNotificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 603var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Dcp\DcpCliArgsTests.cs (1)
54var dcpOptions = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value;
Dcp\DcpExecutorTests.cs (49)
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>(); 797var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 842var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 879var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 914var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 974var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 995var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1031var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1068var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1105var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1135var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1172var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1194var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1229var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1269var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1293var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1328var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1364var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1404var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1435var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1466var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1496var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1525var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1573var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1623var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1660var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1701var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1737var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1779var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1821var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1863var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1900var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1937var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1980var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Dcp\DcpHostNotificationTests.cs (6)
49var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 98var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 153var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 208var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 258var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 326var 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 (1)
26var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
DistributedApplicationTests.cs (51)
135var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 136var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 137var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 178var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 179var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 180var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 253var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 254var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 255var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 330var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 331var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 332var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 490var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 548var s = app.Services.GetRequiredService<IKubernetesService>(); 606var s = app.Services.GetRequiredService<IKubernetesService>(); 653var s = app.Services.GetRequiredService<IKubernetesService>(); 769var s = app.Services.GetRequiredService<IKubernetesService>(); 771var dc = app.Services.GetRequiredService<IDeveloperCertificateService>(); 904var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 905var s = app.Services.GetRequiredService<IKubernetesService>(); 928var events = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 935var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 936var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 937var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 978var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 979var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 980var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1022var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1026var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1073var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1077var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1107var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1111var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1147var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1151var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1182var s = app.Services.GetRequiredService<IKubernetesService>(); 1184var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1211var s = app.Services.GetRequiredService<IKubernetesService>(); 1213var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1240var s = app.Services.GetRequiredService<IKubernetesService>(); 1242var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1270var s = app.Services.GetRequiredService<IKubernetesService>(); 1272var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1296var s = app.Services.GetRequiredService<IKubernetesService>(); 1356var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1375var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1517var s = app.Services.GetRequiredService<IKubernetesService>(); 1588var s = app.Services.GetRequiredService<IKubernetesService>(); 1673var s = app.Services.GetRequiredService<IKubernetesService>(); 1700var s = app.Services.GetRequiredService<IKubernetesService>(); 1702var 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(); 382var healthCheckService = app.Services.GetService<HealthCheckService>(); 403var healthCheckService = app.Services.GetService<HealthCheckService>(); 420var 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();
KestrelConfigTests.cs (1)
359var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Orchestrator\ApplicationOrchestratorTests.cs (15)
34var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 81var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 126var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 176var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 243var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 295var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 347var e = Assert.Throws<InvalidOperationException>(() => app.Services.GetService<ApplicationOrchestrator>()); 365var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 409var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 438await applicationEventing.PublishAsync(new ConnectionStringAvailableEvent(resource.Resource, app.Services), CancellationToken.None); 588var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 634var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 682var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 738var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 792var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Orchestrator\ParameterProcessorTests.cs (11)
493var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 518var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 538var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 564var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 587var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 609var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 634var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 665var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 703var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 707var parameterProcessor = app.Services.GetRequiredService<ParameterProcessor>(); 736var 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 (3)
875app.Services.GetRequiredService<DistributedApplicationModel>(), 876app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 877app.Services,
ProjectResourceTests.cs (23)
81var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 200var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 227var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 245var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 261var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 311var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 331var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 374var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 396var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 421var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 451var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 470var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 494var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 544var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 646var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 677var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 695var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 713var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 732var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 750var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 792var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 826var fakeContainerRuntime = (FakeContainerRuntime)app.Services.GetRequiredService<IContainerRuntime>(); 841var mockImageBuilder = (MockImageBuilder)app.Services.GetRequiredService<IResourceContainerImageBuilder>();
Publishing\ResourceContainerImageBuilderTests.cs (37)
36var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 40var collector = app.Services.GetFakeLogCollector(); 68var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 72var collector = app.Services.GetFakeLogCollector(); 100var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 104var collector = app.Services.GetFakeLogCollector(); 138var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 142var collector = app.Services.GetFakeLogCollector(); 176var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 180var collector = app.Services.GetFakeLogCollector(); 210var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 214var collector = app.Services.GetFakeLogCollector(); 248var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 252var collector = app.Services.GetFakeLogCollector(); 289var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 293var collector = app.Services.GetFakeLogCollector(); 328var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 332var collector = app.Services.GetFakeLogCollector(); 364var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 368var collector = app.Services.GetFakeLogCollector(); 393var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 399var collector = app.Services.GetFakeLogCollector(); 444var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 450var collector = app.Services.GetFakeLogCollector(); 471var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 497var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 519var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 540var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 570var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 602var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 634var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 671var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 678var collector = app.Services.GetFakeLogCollector(); 717var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 721var collector = app.Services.GetFakeLogCollector(); 789var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 884var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>();
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 (5)
380var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 416var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 459var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 544var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 670var 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>();