Implemented interface member:
property
Services
Microsoft.Extensions.Hosting.IHost.Services
633 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)
684_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 (156)
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)
149var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 192var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 242var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 289var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 345var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 449var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 626var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 672var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 879var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder; 996var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 1085var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 1117var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>();
AzureEventHubsExtensionsTests.cs (4)
289var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 353var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 414var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 488var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None);
AzureFunctionsTests.cs (7)
160var model = host.Services.GetRequiredService<DistributedApplicationModel>(); 186var model = host.Services.GetRequiredService<DistributedApplicationModel>(); 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>();
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 (1)
237var 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.Kafka.Tests (2)
AddKafkaTests.cs (2)
22var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 64var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Keycloak.Tests (3)
KeycloakPublicApiTests.cs (2)
167var entries = await containerAnnotation.Callback(new() { Model = keycloakResource, ServiceProvider = app.Services }, CancellationToken.None); 194var entries = await containerAnnotation.Callback(new() { Model = keycloakResource, ServiceProvider = app.Services }, CancellationToken.None);
KeycloakResourceBuilderTests.cs (1)
23var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Maui.Tests (4)
MauiMacCatalystExtensionsTests.cs (2)
238await app.Services.GetRequiredService<IDistributedApplicationEventing>() 239.PublishAsync(new BeforeResourceStartedEvent(macCatalyst.Resource, app.Services), CancellationToken.None);
MauiWindowsExtensionsTests.cs (2)
225await app.Services.GetRequiredService<IDistributedApplicationEventing>() 226.PublishAsync(new BeforeResourceStartedEvent(windows.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 (3)
AddMongoDBTests.cs (3)
23var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 51var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 82var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.MySql.Tests (9)
AddMySqlTests.cs (8)
43var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 82var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 120var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 139var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 243await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 271var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 274builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 363var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
MySqlFunctionalTests.cs (1)
578var rns = app.Services.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Nats.Tests (4)
AddNatsTests.cs (4)
48var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 81var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 99var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 141var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.NodeJs.Tests (28)
AddNodeAppTests.cs (3)
215var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 242var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 272var 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.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 (24)
AddPythonAppTests.cs (24)
154var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 192var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 234var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 401var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 434var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 495var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 523var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 545var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 566var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 602var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 618var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 637var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 656var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 677var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 713var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 747var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 779var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 803var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 825var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 851var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1106var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1144var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1184var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1221var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services);
Aspire.Hosting.Qdrant.Tests (4)
AddQdrantTests.cs (4)
45var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 84var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 117var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 283var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.RabbitMQ.Tests (3)
AddRabbitMQTests.cs (3)
50var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 102var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 141var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Redis.Tests (15)
AddRedisTests.cs (10)
30var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 58var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 89var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 106var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 121var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 467var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 496await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 522await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 543await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 695var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
RedisFunctionalTests.cs (5)
144var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 476var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 511var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 612var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 622var clientFactory = app.Services.GetRequiredService<IHttpClientFactory>();
Aspire.Hosting.Seq.Tests (6)
AddSeqTests.cs (6)
21var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 49var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 78var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 175var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 208var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 238var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.SqlServer.Tests (4)
AddSqlServerTests.cs (4)
43var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 90var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 112var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 276var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Testing (6)
DistributedApplicationFactory.cs (2)
172_shutdownTimeout = application.Services.GetService<IOptions<HostOptions>>()?.Value.ShutdownTimeout ?? _shutdownTimeout; 428_hostApplicationLifetime = app.Services.GetService<IHostApplicationLifetime>()
DistributedApplicationHostingTestingExtensions.cs (3)
28var clientFactory = app.Services.GetRequiredService<IHttpClientFactory>(); 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)
102var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 164var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 401var hostEnvironment = app.Services.GetRequiredService<IHostEnvironment>(); 417var config = app.Services.GetRequiredService<IConfiguration>();
TestingFactoryTests.cs (3)
43var appModel = _app.Services.GetRequiredService<DistributedApplicationModel>(); 65var appModel = _app.Services.GetRequiredService<IHostEnvironment>(); 74var config = _app.Services.GetRequiredService<IConfiguration>();
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (4)
35var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 78var hostApplicationLifetime = app.Services.GetRequiredService<IHostApplicationLifetime>(); 124var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 125var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
Aspire.Hosting.Tests (279)
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)
38var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 63var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 147var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 189var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 238var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 270var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 302var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 335var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 372var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 392var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 426var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 460var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 524var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 546var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 582var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 686var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 796var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 841var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 878var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 913var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 973var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 994var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1030var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1067var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1104var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1134var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1171var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1193var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1228var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1268var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1292var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1327var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1363var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1403var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1434var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1465var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1495var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1524var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1572var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1617var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1654var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1695var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1731var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1773var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1815var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1857var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1894var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1931var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1974var 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 (50)
134var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 135var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 136var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 177var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 178var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 179var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 252var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 253var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 254var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 329var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 330var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 331var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 489var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 547var s = app.Services.GetRequiredService<IKubernetesService>(); 605var s = app.Services.GetRequiredService<IKubernetesService>(); 654var s = app.Services.GetRequiredService<IKubernetesService>(); 655var dc = app.Services.GetRequiredService<IDeveloperCertificateService>(); 733var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 734var s = app.Services.GetRequiredService<IKubernetesService>(); 757var events = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 764var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 765var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 766var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 807var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 808var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 809var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 851var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 855var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 902var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 906var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 936var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 940var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 976var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 980var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1011var s = app.Services.GetRequiredService<IKubernetesService>(); 1013var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1040var s = app.Services.GetRequiredService<IKubernetesService>(); 1042var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1069var s = app.Services.GetRequiredService<IKubernetesService>(); 1071var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1099var s = app.Services.GetRequiredService<IKubernetesService>(); 1101var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1125var s = app.Services.GetRequiredService<IKubernetesService>(); 1185var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1204var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1346var s = app.Services.GetRequiredService<IKubernetesService>(); 1400var s = app.Services.GetRequiredService<IKubernetesService>(); 1467var s = app.Services.GetRequiredService<IKubernetesService>(); 1494var s = app.Services.GetRequiredService<IKubernetesService>(); 1496var 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)
79var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 198var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 225var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 243var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 259var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 309var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 329var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 372var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 394var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 419var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 449var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 468var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 492var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 542var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 644var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 675var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 693var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 711var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 730var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 748var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 790var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 825var mockImageBuilder = (MockImageBuilder)app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 831var fakeContainerRuntime = (FakeContainerRuntime)app.Services.GetRequiredService<IContainerRuntime>();
Publishing\ResourceContainerImageBuilderTests.cs (37)
35var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 39var collector = app.Services.GetFakeLogCollector(); 67var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 71var collector = app.Services.GetFakeLogCollector(); 99var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 103var collector = app.Services.GetFakeLogCollector(); 137var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 141var collector = app.Services.GetFakeLogCollector(); 175var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 179var collector = app.Services.GetFakeLogCollector(); 209var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 213var collector = app.Services.GetFakeLogCollector(); 247var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 251var collector = app.Services.GetFakeLogCollector(); 288var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 292var collector = app.Services.GetFakeLogCollector(); 327var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 331var collector = app.Services.GetFakeLogCollector(); 363var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 367var collector = app.Services.GetFakeLogCollector(); 392var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 398var collector = app.Services.GetFakeLogCollector(); 443var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 449var collector = app.Services.GetFakeLogCollector(); 470var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 496var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 518var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 539var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 569var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 601var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 633var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 670var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 677var collector = app.Services.GetFakeLogCollector(); 716var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 720var collector = app.Services.GetFakeLogCollector(); 788var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageBuilder>(); 883var 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)
276Services = app.Services, 307Services = app.Services, 339Services = app.Services, 377Services = app.Services,
Aspire.Playground.Tests (11)
AppHostTests.cs (1)
68var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Infrastructure\DistributedApplicationExtensions.cs (6)
104var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 114var environment = app.Services.GetRequiredService<IHostEnvironment>(); 115var logCollector = app.Services.GetFakeLogCollector(); 132var environment = app.Services.GetRequiredService<IHostEnvironment>(); 133var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 212var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(TryApplyEfMigrationsAsync));
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (4)
35var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 78var hostApplicationLifetime = app.Services.GetRequiredService<IHostApplicationLifetime>(); 124var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 125var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
TestingAppHost1.AppHost (1)
Program.cs (1)
59var notifications = app.Services.GetRequiredService<ResourceNotificationService>();