Implemented interface member:
property
Services
Microsoft.Extensions.Hosting.IHost.Services
2816 references to Services
Aspire.Hosting (2)
DistributedApplication.cs (1)
322/// exposes a <see cref="Services"/> property which allows developers to get services from the
DistributedApplicationBuilder.cs (1)
907_executionContextOptions.Services = application.Services.GetRequiredService<IServiceProvider>();
Aspire.Hosting.Azure.EntraId.Tests (50)
EntraIdInitializationTests.cs (12)
246var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 272var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 314var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 367var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 387app.Services.GetRequiredService<IHostApplicationLifetime>().StopApplication(); 436var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 495var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 523var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 524var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 525var loggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 527return eventing.PublishAsync(new InitializeResourceEvent(resource, eventing, loggerService, notifications, app.Services), cancellationToken); 536var loggerService = app.Services.GetRequiredService<ResourceLoggerService>();
EntraIdProvisioningTests.cs (21)
192var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 505var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 507var options = app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value; 510workspace.Path, options, app.Services, NullLogger<AzurePublishingContext>.Instance, step); 529var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 534app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value, 535app.Services, 555var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 559app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value, 560app.Services, 587var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 592app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value, 593app.Services, 618var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 623app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value, 624app.Services, 658var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 660var options = app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value; 663workspace.Path, options, app.Services, NullLogger<AzurePublishingContext>.Instance, step); 1271node.Resource, DistributedApplicationOperation.Run, app.Services).AsTask(); 1340node.Resource, DistributedApplicationOperation.Run, app.Services).AsTask();
EntraIdResourceBuilderTests.cs (17)
26var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 46var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 65var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 192var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 210var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 228var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 308var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 325var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 342var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 360var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 377var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 460var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 478var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1030var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1051var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1074var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1347var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Azure.Kubernetes.Tests (27)
AzureKubernetesEnvironmentExtensionsTests.cs (13)
356var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 645var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 689var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 711var roles = app.Services.GetRequiredService<DistributedApplicationModel>().Resources 729var roles = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources 763var roles = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<AzureRoleAssignmentResource>(); 795var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 827var operatorRole = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>() 831var registryRole = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>() 865Assert.Empty(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<AzureUserAssignedIdentityResource>()); 880var roles = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources 914var roles = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<AzureRoleAssignmentResource>(); 968var roles = app.Services.GetRequiredService<DistributedApplicationModel>().Resources
AzureKubernetesInfrastructureTests.cs (12)
1390var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1394app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1395app.Services, 1486var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1490app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1491app.Services, 1699var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1703app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1704app.Services, 1769var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1773app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1774app.Services,
AzureKubernetesPersistentVolumeTests.cs (2)
61var store = app.Services.GetRequiredService<IAspireStore>(); 65serviceProvider: app.Services);
Aspire.Hosting.Azure.Kusto.Tests (7)
KustoFunctionalTests.cs (7)
55var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 108var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 188var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 192var snapshot = app.Services.GetRequiredService<FakeLogCollector>().GetSnapshot(); 216var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 224var snapshot = app.Services.GetRequiredService<FakeLogCollector>().GetSnapshot(); 257var rns = app.Services.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Azure.Tests (778)
AzureAppConfigurationExtensionsTests.cs (1)
23var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureAppServiceEnvironmentExtensionsTests.cs (4)
122var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 152var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 173var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 200var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureAppServiceTests.cs (33)
64var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 111var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 140var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 180var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 257var reporter = app.Services.GetRequiredService<IPipelineActivityReporter>() as TestPipelineActivityReporter; 293var reporter = app.Services.GetRequiredService<IPipelineActivityReporter>() as TestPipelineActivityReporter; 327var reporter = app.Services.GetRequiredService<IPipelineActivityReporter>() as TestPipelineActivityReporter; 361var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 398var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 479var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 517var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 554var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 595var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 855var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 877var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 908var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 944var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 980var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1018var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1053var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1129var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1160var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1235var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1256var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1277var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1298var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1320var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1346var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1377var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1409var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1452var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1472app.Services.GetRequiredService<DistributedApplicationModel>(), 1474app.Services,
AzureBicepProvisionerTests.cs (3)
45var provisioner = app.Services.GetRequiredService<IBicepProvisioner>(); 101var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 105var rns = app.Services.GetRequiredService<ResourceNotificationService>();
AzureBicepResourceTests.cs (1)
78var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureConnectorNamespaceTests.cs (7)
33var options = app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(); 181var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 222var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 255var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 282var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 373var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 388var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureContainerAppEnvironmentExtensionsTests.cs (8)
275var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 304var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 347var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 373var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 399var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 419var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 445var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 596var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureContainerAppExpressEndpointTests.cs (2)
369app.Services.GetRequiredService<DistributedApplicationModel>(), builder.ExecutionContext, 370app.Services, NullLogger.Instance, TestContext.Current.CancellationToken);
AzureContainerAppsTests.cs (74)
61var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 95var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 125var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 247var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 279var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 323var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 353var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 427var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 460var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 531var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 572var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 602var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 638var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 674var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 712var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 752var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 784var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 816var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 853var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 904var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 986var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1035var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1066var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1098var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1127var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1164var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1208var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1249var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1324var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1344var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1365var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1388var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1419var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1455var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1486var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1513var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1544var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1586var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1613var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1668var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1719var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1789var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1811var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1841var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1887var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2035var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2089var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2188var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2218var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2247var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2400var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2451var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2473var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2510var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2551var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2591var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2621var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2657var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2695var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2733var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2778var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2808var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2884var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2908var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2932var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2971var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3025var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3074var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3105var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3145var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3186var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3233var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3268app.Services.GetRequiredService<DistributedApplicationModel>(), 3270app.Services,
AzureContainerRegistryTests.cs (3)
27var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 49var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 85var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureCosmosDBEmulatorFunctionalTests.cs (3)
174var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 222var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 292var rns = app.Services.GetRequiredService<ResourceNotificationService>();
AzureCosmosDBExtensionsTests.cs (14)
206var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 317var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 354var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 804var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 806var beforeStartEvent = new BeforeStartEvent(app.Services, model); 836var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 838var beforeStartEvent = new BeforeStartEvent(app.Services, model); 865var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 867var beforeStartEvent = new BeforeStartEvent(app.Services, model); 895var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 897var beforeStartEvent = new BeforeStartEvent(app.Services, model); 1141() => builder.Eventing.PublishAsync(new ResourceReadyEvent(cosmos.Resource, app.Services))); 1158await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(cosmos.Resource, app.Services)); 1232var healthCheckService = app.Services.GetRequiredService<HealthCheckService>();
AzureDeployerTests.cs (16)
100var environment = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<AzureEnvironmentResource>()); 103var runtime = Assert.IsType<FakeContainerRuntime>(app.Services.GetRequiredService<IContainerRuntime>()); 198var runtime = Assert.IsType<FakeContainerRuntime>(app.Services.GetRequiredService<IContainerRuntime>()); 371var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 429var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 492var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 555var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 621var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 916var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 1151var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 1210var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 1437var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 1902var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 1993var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 2026var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 2090var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>();
AzureEnvironmentResourceExtensionsTests.cs (404)
73var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 98var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 109Services = app.Services, 155var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 157app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 158app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 172Services = app.Services, 181Services = app.Services, 208var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 210app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 211app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 229var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 230var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 265var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 267app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 268app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 282await LoadInputAsync(app.Services, inputs, suffix); 298var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 306Services = app.Services, 479var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 487await LoadInputAsync(app.Services, inputs, tenantInput); 497await LoadInputAsync(app.Services, inputs, subscriptionInput); 506await LoadInputAsync(app.Services, inputs, resourceGroupInput); 515await LoadInputAsync(app.Services, inputs, locationInput); 536var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 542await LoadInputAsync(app.Services, inputs, tenantInput); 551await LoadInputAsync(app.Services, inputs, subscriptionInput); 561await LoadInputAsync(app.Services, inputs, resourceGroupInput); 580var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 591await LoadInputAsync(app.Services, inputs, locationInput); 610var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 611var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 654Services = app.Services, 702var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 708Services = app.Services, 743var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 744var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 786var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 787var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 788var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 816var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 817var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 836var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 837var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 839var (steps, pipelineContext) = await CreateAzureEnvironmentPipelineStepsAsync(environmentResource, model, app.Services); 857var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 861app.Services.GetRequiredService<ResourceLoggerService>(), 863app.Services)); 896var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 897var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 925var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 926var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 947var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 948var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 968var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 970app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 971app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 973await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1017var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1018var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 1020app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1021app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1023await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1052var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1053var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 1055app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1056app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1058await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1068Services = app.Services, 1100var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1102app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1103app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1105await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1149Services = app.Services, 1212var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1214app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1215app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1217await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1233Services = app.Services, 1487var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1489app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1490app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1492await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1502Services = app.Services, 1545var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1547app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1548app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1550await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1566Services = app.Services, 1606var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1608app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1609app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1611await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1627Services = app.Services, 1667var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1668var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 1670app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1671app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1673await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1688Services = app.Services, 1722var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1723var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 1725app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1726app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1727var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 1729await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1794var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1795var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 1797app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1798app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1799var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 1801await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1823Services = app.Services, 1856var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1858app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1859app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1860var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 1862await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1881Services = app.Services, 1915var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1917app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1918app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1919var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 1921await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1932Services = app.Services, 1944Services = app.Services, 1971var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1972var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 1974app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1975app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1977await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2009var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2010var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2012app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2013app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2015await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2028Services = app.Services, 2076var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2077var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2079app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2080app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2082await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2112Services = app.Services, 2179var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2180var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2182app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2183app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2185await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2206Services = app.Services, 2250var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2251var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2253app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2254app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2257await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2277Services = app.Services, 2330var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2331var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2333app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2334app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2336await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2355Services = app.Services, 2369Services = app.Services, 2397var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2398var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2400app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2401app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2403await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2434Services = app.Services, 2475var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2476var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2478app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2479app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2481await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2498Services = app.Services, 2535var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2536var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2538app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2539app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2542await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2552Services = app.Services, 2596var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2597var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2599app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2600app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2603await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2612Services = app.Services, 2651var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2652var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 2677var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2679app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2680app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2682await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2689Services = app.Services, 2703Services = app.Services, 2753var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2754var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2756app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2757app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2759await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2766Services = app.Services, 2783Services = app.Services, 2841var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2842var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2844app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2845app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2847await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2849var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 2864Services = app.Services, 2899var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2901app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2902app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2904await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2910Services = app.Services, 2951var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2953app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2954app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2956await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2963Services = app.Services, 2977Services = app.Services, 3013var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3014var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3016app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3017app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3020await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3030Services = app.Services, 3088var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3089var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3091app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3092app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3094await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3103Services = app.Services, 3143var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3144var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3146app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3147app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3149await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3156Services = app.Services, 3203var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3204var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3206app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3207app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3209await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3216Services = app.Services, 3247var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3248var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3250app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3251app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3253await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3271await LoadInputAsync(app.Services, commandInputs, commandLocationInput); 3277Services = app.Services, 3319var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3320var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3322app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3323app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3325await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3347Services = app.Services, 3386var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3387var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3389app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3390app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3392await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3408Services = app.Services, 3445var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3446var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3448app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3449app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3451await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3477Services = app.Services, 3511var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3512var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3514app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3515app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3517await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3534Services = app.Services, 3575var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3576var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3578app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3579app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3581await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3597Services = app.Services, 3640var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3641var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3643app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3644app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3646await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3668Services = app.Services, 3697var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3698var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3723Services = app.Services, 3755var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3756var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3763Services = app.Services, 3822var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3823var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3837Services = app.Services, 3872var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3885Services = app.Services, 3917var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3918var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3941Services = app.Services, 3972var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3974app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3975app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3977await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3979var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 4013var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4015app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4016app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4018await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4020var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 4059var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4060var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4062app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4063app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4065await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4088Services = app.Services, 4117var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4119app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4120app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4122await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4132var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 4153var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4154var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4156app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4157app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4159await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4167Services = app.Services, 4221var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4222var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4224app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4225app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4227await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4239Services = app.Services, 4301var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4302var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4304app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4305app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4307await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4319Services = app.Services, 4380var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4381var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4383app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4384app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4386await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4393Services = app.Services, 4431var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4432var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4434app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4435app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4437await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4445Services = app.Services, 4478var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4479var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4481app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4482app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4484await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4491Services = app.Services, 4524var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4525var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4527app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4528app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4530await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4537Services = app.Services, 4592var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4594app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4595app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4597await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4605Services = app.Services, 4628var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4629var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4631var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 4677var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4678var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4680var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 4725var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4726var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4728var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 4785var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4786var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4788var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 4826var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4844Services = app.Services, 4885var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4896Services = app.Services, 4926var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4943Services = app.Services, 4973var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4975var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4991Services = app.Services, 5028var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5029var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 5063var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5064var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 5065var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 5105var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5106var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 5108app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 5109app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 5110var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 5112await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 5129Services = app.Services, 5163var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5164var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 5165var controller = app.Services.GetRequiredService<AzureProvisioningController>();
AzureEnvironmentResourceTests.cs (7)
266var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 290var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 321var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 357var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 384var provisioningOptions = app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value; 385var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger<AzurePublishingContext>(); 388return new AzurePublishingContext(outputPath, provisioningOptions, app.Services, logger, step);
AzureEventHubsExtensionsTests.cs (4)
291var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 353var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, Services = app.Services }, CancellationToken.None); 410var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, Services = app.Services }, CancellationToken.None); 480var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, Services = app.Services }, CancellationToken.None);
AzureFunctionsTests.cs (8)
171var model = host.Services.GetRequiredService<DistributedApplicationModel>(); 197var model = host.Services.GetRequiredService<DistributedApplicationModel>(); 642var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 675var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 703var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 732var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 763var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1084var model = host.Services.GetRequiredService<DistributedApplicationModel>();
AzureKeyVaultTests.cs (1)
36var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureKustoExtensionsTests.cs (1)
24var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureManagedRedisExtensionsTests.cs (1)
37var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureManifestUtils.cs (1)
51var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureOpenAIExtensionsTests.cs (1)
61var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzurePostgresExtensionsTests.cs (4)
38var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 61var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 383var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 413var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureProvisioningResourceTests.cs (3)
36var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 70var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 103var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureRedisExtensionsTests.cs (2)
39var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 59var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureResourcePreparerTests.cs (22)
39var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 78var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 79await app.Services.GetRequiredService<AzureResourcePreparer>().PrepareResourcesAsync(model, default); 89await app.Services.GetRequiredService<AzureResourcePreparer>().PrepareResourcesAsync(model, default); 112var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 113var preparer = app.Services.GetRequiredService<AzureResourcePreparer>(); 190var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 238var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 284var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 339var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 404app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<AzureRoleAssignmentResource>(), 460var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 481var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 593var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 628var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 693var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 749var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 852var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 854app.Services.GetRequiredService<DistributedApplicationModel>(), 855app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 856app.Services, 857app.Services.GetRequiredService<ILogger<AzureResourcePreparerTests>>(),
AzureRunAsEmulatorModeTests.cs (6)
63var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 64var preparer = app.Services.GetRequiredService<AzureResourcePreparer>(); 66await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 81var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 82var preparer = app.Services.GetRequiredService<AzureResourcePreparer>(); 84await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None);
AzureSandboxesTests.cs (85)
61app.Services.GetRequiredService<DistributedApplicationModel>(), 62app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 63app.Services, 108app.Services.GetRequiredService<DistributedApplicationModel>(), 109app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 110app.Services, 160var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 198var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 339var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 361var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 415var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 476var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1046app.Services.GetRequiredService<DistributedApplicationModel>(), 1047app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1048app.Services, 1078app.Services.GetRequiredService<DistributedApplicationModel>(), 1079app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1080app.Services, 1116app.Services.GetRequiredService<DistributedApplicationModel>(), 1117app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1118app.Services, 1185app.Services.GetRequiredService<DistributedApplicationModel>(), 1186app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1187app.Services, 1232app.Services.GetRequiredService<DistributedApplicationModel>(), 1233app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1234app.Services, 2015var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2181var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2243var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2282var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2306var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2347var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2365app.Services, 2381app.Services, 2443Services = app.Services, 2481Services = app.Services, 2507var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2531var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2594var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2651var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2666app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 2667app.Services, 2696app.Services.GetRequiredService<DistributedApplicationModel>().GetProjectResources(), 2722app.Services.GetRequiredService<DistributedApplicationModel>().GetProjectResources(), 2776var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2789app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 2790app.Services, 2799var stateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 2862var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2900Services = app.Services, 2902Model = app.Services.GetRequiredService<DistributedApplicationModel>() 2932var stateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 2947app.Services.GetRequiredService<DistributedApplicationModel>(), 2948app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 2949app.Services, 2982app.Services.GetRequiredService<DistributedApplicationModel>(), 2983app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 2984app.Services, 3019app.Services.GetRequiredService<DistributedApplicationModel>(), 3020app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 3021app.Services, 3057var executionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>(); 3065Services = app.Services, 3067Model = app.Services.GetRequiredService<DistributedApplicationModel>() 3101Services = app.Services, 3103Model = app.Services.GetRequiredService<DistributedApplicationModel>() 3137var executionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>(); 3149Services = app.Services, 3151Model = app.Services.GetRequiredService<DistributedApplicationModel>() 3174app.Services.GetRequiredService<DistributedApplicationModel>(), 3175app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 3176app.Services, 3218var stateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 3229app.Services.GetRequiredService<DistributedApplicationModel>(), 3230app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 3231app.Services, 3262app.Services.GetRequiredService<DistributedApplicationModel>(), 3263app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 3264app.Services, 3326app.Services.GetRequiredService<DistributedApplicationModel>(), 3328app.Services, 3363app.Services.GetRequiredService<DistributedApplicationModel>(), 3364app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 3365app.Services,
AzureSearchExtensionsTests.cs (1)
40var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureServiceBusExtensionsTests.cs (6)
139var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 371var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, Services = app.Services }, CancellationToken.None); 466var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, Services = app.Services }, CancellationToken.None); 518var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, Services = app.Services }, CancellationToken.None); 574var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, Services = app.Services }, CancellationToken.None); 1092var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureSignalRExtensionsTests.cs (2)
21var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 43var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureStorageEmulatorFunctionalTests.cs (6)
49var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 94var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 137var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 191var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 224var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 264var rns = app.Services.GetRequiredService<ResourceNotificationService>();
AzureStorageExtensionsTests.cs (1)
651var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureUserAssignedIdentityTests.cs (10)
29var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 48var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 69var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 111var identity = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<AzureUserAssignedIdentityResource>()); 130var resource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<AzureUserAssignedIdentityResource>()); 146Assert.Empty(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<AzureUserAssignedIdentityResource>()); 166var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 203var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 261var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 340var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureWebPubSubEmulatorTests.cs (3)
132var health = await app.Services.GetRequiredService<HealthCheckService>().CheckHealthAsync(); 145var registration = Assert.Single(app.Services.GetRequiredService<IOptions<HealthCheckServiceOptions>>().Value.Registrations, 148var healthTask = registration.Factory(app.Services).CheckHealthAsync(new HealthCheckContext { Registration = registration }, cts.Token);
AzureWebPubSubExtensionsTests.cs (1)
334var model = app.Services.GetRequiredService<DistributedApplicationModel>();
ContainerRegistryTests.cs (4)
28var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 58var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 96var publisher = app.Services.GetRequiredKeyedService<IDistributedApplicationPublisher>("test-publisher") as ContainerRegistryValidatingPublisher; 98var model = app.Services.GetRequiredService<DistributedApplicationModel>();
ExistingAzureResourceTests.cs (2)
76var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 561var model = app.Services.GetRequiredService<DistributedApplicationModel>();
FoundryExtensionsTests.cs (13)
95var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 96Assert.Contains(app.Services.GetServices<global::Microsoft.Extensions.Hosting.IHostedService>(), service => service is FoundryLocalLifecycleService); 355.PublishAsync(new ResourceReadyEvent(foundry.Resource, app.Services), cancellation.Token) 572var httpClientFactory = app.Services.GetRequiredService<IHttpClientFactory>(); 668var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 714var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 734var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 752var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 796var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 827var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 864var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 904var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 943var model = app.Services.GetRequiredService<DistributedApplicationModel>();
RoleAssignmentTests.cs (5)
236var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 265var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 295var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 323var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 347var model = app.Services.GetRequiredService<DistributedApplicationModel>();
TokenCredentialProviderTests.cs (5)
20var provider = app.Services.GetRequiredService<ITokenCredentialProvider>(); 34var first = app.Services.GetRequiredService<ITokenCredentialProvider>(); 35var second = app.Services.GetRequiredService<ITokenCredentialProvider>(); 50var provider = app.Services.GetRequiredService<ITokenCredentialProvider>(); 69var resolved = app.Services.GetRequiredService<ITokenCredentialProvider>();
Aspire.Hosting.Blazor.Tests (6)
AddBlazorGatewayTests.cs (3)
88await AssertGatewayProcessLaunchPlanAsync(gateway.Resource, builder, app.Services); 242var imageBuilder = publishApp.Services.GetRequiredService<IResourceContainerImageManager>(); 243var runtime = await publishApp.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(TestContext.Current.CancellationToken);
AddDotnetProjectBlazorGatewayTests.cs (1)
69await AddBlazorGatewayTests.AssertGatewayProcessLaunchPlanAsync(gateway.Resource, builder, app.Services);
BlazorHostedExtensionsTests.cs (2)
615var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 616await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
Aspire.Hosting.Browsers.Tests (51)
BrowserLogsBuilderExtensionsTests.cs (51)
44var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 98var browserLogsResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>()); 109Services = app.Services, 116Services = app.Services, 123Services = app.Services, 153var browserLogsResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>()); 162Services = app.Services, 189var browserLogsResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>()); 222var browserLogsResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>()); 299var browserLogsResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>()); 326var browserLogsResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>()); 350var browserLogsResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>()); 376var browserLogsResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>()); 419var browserLogsResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>()); 445var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single(); 481var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single(); 491app.Services.GetRequiredService<IConfiguration>(), 492app.Services.GetRequiredService<BrowserLogsConfigurationStore>()); 524var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single(); 534app.Services.GetRequiredService<IConfiguration>(), 535app.Services.GetRequiredService<BrowserLogsConfigurationStore>()); 564var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single(); 572app.Services.GetRequiredService<IConfiguration>(), 573app.Services.GetRequiredService<BrowserLogsConfigurationStore>()); 603var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single(); 613app.Services.GetRequiredService<IConfiguration>(), 614app.Services.GetRequiredService<BrowserLogsConfigurationStore>()); 648var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single(); 658app.Services.GetRequiredService<IConfiguration>(), 659app.Services.GetRequiredService<BrowserLogsConfigurationStore>()); 699var browserLogsResources = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().ToArray(); 738var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single(); 747app.Services.GetRequiredService<IConfiguration>(), 748app.Services.GetRequiredService<BrowserLogsConfigurationStore>()); 792var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single(); 836var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single(); 876var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single(); 885app.Services.GetRequiredService<ResourceLoggerService>().WatchAsync(browserLogsResource.Name), 952var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single(); 1005var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single(); 1090var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single(); 1163var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single(); 1219var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single(); 1279var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single(); 1315var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single(); 1343var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single(); 1357var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 1358await eventing.PublishAsync(new ResourceReadyEvent(web.Resource, app.Services)).DefaultTimeout(); 1399var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single(); 1534var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single(); 1606var browserLogsResource = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<BrowserLogsResource>().Single();
Aspire.Hosting.Containers.Tests (21)
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>(); 174var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 208var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 236var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 255var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 304var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources()); 351var containerResource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
ResourceFailureLoggingTests.cs (4)
32logCollector = app.Services.GetFakeLogCollector(); 56logCollector = app.Services.GetFakeLogCollector(); 80logCollector = app.Services.GetFakeLogCollector(); 103logCollector = app.Services.GetFakeLogCollector();
WithDockerfileTests.cs (7)
79var collector = app.Services.GetFakeLogCollector(); 214var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 247var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 484var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 555var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 957var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1003var appModel1 = app1.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.DevTunnels.Tests (14)
DevTunnelMonitorTests.cs (5)
92test.App.Services.GetRequiredService<ResourceLoggerService>().GetLogger(test.Tunnel) 113test.App.Services.GetRequiredService<IDistributedApplicationEventing>().Subscribe<ResourceEndpointsAllocatedEvent>(test.Port, async (_, ct) => 256test.App.Services.GetRequiredService<IDistributedApplicationEventing>().Subscribe<ResourceEndpointsAllocatedEvent>(test.Port, 696test.App.Services.GetRequiredService<IDistributedApplicationEventing>().Subscribe<ResourceEndpointsAllocatedEvent>(test.Port, async (_, ct) => 717test.App.Services.GetRequiredService<IDistributedApplicationEventing>().Subscribe<ResourceEndpointsAllocatedEvent>(test.Port, (_, _) =>
DevTunnelResourceBuilderExtensionsTests.cs (7)
224await builder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnel.Resource, app.Services)).DefaultTimeout(); 264await builder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnel.Resource, app.Services)).DefaultTimeout(); 300var monitor = app.Services.GetRequiredKeyedService<DevTunnelMonitor>(tunnel.Resource); 362var monitor = app.Services.GetRequiredKeyedService<DevTunnelMonitor>(tunnel.Resource); 816var monitor = app.Services.GetRequiredKeyedService<DevTunnelMonitor>(tunnel.Resource); 840var monitor = app.Services.GetRequiredKeyedService<DevTunnelMonitor>(tunnel.Resource); 846var notifications = app.Services.GetRequiredService<ResourceNotificationService>();
TestDevTunnelMonitor.cs (2)
38Monitor = App.Services.GetRequiredKeyedService<DevTunnelMonitor>(Tunnel); 99await using var reader = App.Services.GetRequiredService<ResourceLoggerService>().WatchAsync(resource ?? Tunnel).GetAsyncEnumerator();
Aspire.Hosting.Docker.Tests (3)
DockerComposePublisherTests.cs (1)
232var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder;
DockerComposeTests.cs (2)
883var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 936var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Dotnet.Tests (125)
DotnetProjectBuildCoordinatorTests.cs (98)
75new BeforeResourceStartedEvent(buildResource, app.Services), 77var args = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 113new BeforeResourceStartedEvent(buildResource, app.Services), 115var args = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 154app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 157new BeforeResourceStartedEvent(buildResource, app.Services), 159var firstArgs = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 174new BeforeResourceStartedEvent(buildResource, app.Services), 176var secondArgs = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 219new BeforeResourceStartedEvent(buildResource, app.Services), 223app.Services); 236new BeforeResourceStartedEvent(rebuilder, app.Services), 240app.Services); 430new BeforeResourceStartedEvent(buildResource, app.Services), 432var buildArgs = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 450new BeforeResourceStartedEvent(rebuilder, app.Services), 452var rebuildArgs = await ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services); 462var fileArgs = await ArgumentEvaluator.GetArgumentListAsync(file.Resource, app.Services); 535app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 538new BeforeResourceStartedEvent(projectBuild, app.Services), 541new BeforeResourceStartedEvent(fileBuild, app.Services), 543var projectBuildArgs = await ArgumentEvaluator.GetArgumentListAsync(projectBuild, app.Services); 547var fileBuildArgs = await ArgumentEvaluator.GetArgumentListAsync(fileBuild, app.Services); 552var fileArgs = await ArgumentEvaluator.GetArgumentListAsync(file.Resource, app.Services); 615var args = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1129serviceProvider: app.Services); 1326serviceProvider: app.Services)); 1348serviceProvider: app.Services); 1355serviceProvider: app.Services)); 1358serviceProvider: app.Services); 1391serviceProvider: app.Services); 1394serviceProvider: app.Services); 1428new BeforeResourceStartedEvent(buildResource, app.Services), 1432serviceProvider: app.Services); 1433await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, serviceProvider: app.Services); 1445new BeforeResourceStartedEvent(buildResource, app.Services), 1449serviceProvider: app.Services); 1455serviceProvider: app.Services); 1524serviceProvider: app.Services); 1547serviceProvider: app.Services)); 1597await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(buildResource, serviceProvider: app.Services)); 1604serviceProvider: app.Services); 1652new BeforeResourceStartedEvent(buildResource, app.Services), 1656serviceProvider: app.Services); 1670serviceProvider: app.Services); 1674serviceProvider: app.Services); 1700new BeforeResourceStartedEvent(rebuilder, app.Services), 1705serviceProvider: app.Services).AsTask(); 1707var refreshedArgumentsTask = ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services).AsTask(); 1710serviceProvider: app.Services).AsTask(); 1718var projectArguments = await ArgumentEvaluator.GetArgumentListAsync(project.Resource, app.Services); 1769new BeforeResourceStartedEvent(buildResource, app.Services), 1773serviceProvider: app.Services).AsTask(); 1779new BeforeResourceStartedEvent(rebuilder, app.Services), 1785var firstArguments = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 1799serviceProvider: app.Services); 1800var secondArguments = await ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services); 1845app.Services, 1850app.Services, 1905new BeforeResourceStartedEvent(buildResource, app.Services), 1911app.Services, 1928new BeforeResourceStartedEvent(rebuilder, app.Services), 1932app.Services, 1960app.Services, 1963app.Services.GetRequiredService<IHostApplicationLifetime>().StopApplication(); 1993serviceProvider: app.Services); 1996serviceProvider: app.Services); 1999serviceProvider: app.Services); 2049var arguments = await ArgumentEvaluator.GetArgumentListAsync(project.Resource, app.Services); 2088var firstArguments = await ArgumentEvaluator.GetArgumentListAsync(project.Resource, app.Services); 2097var secondArguments = await ArgumentEvaluator.GetArgumentListAsync(project.Resource, app.Services); 2378var args = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 2410var args = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 2440serviceProvider: app.Services); 2473serviceProvider: app.Services); 2506serviceProvider: app.Services); 3045var args = await ArgumentEvaluator.GetArgumentListAsync(missing.Resource, app.Services); 3154Services = app.Services, 3195var wait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 3223var coordinator = app.Services.GetRequiredService<DotnetProjectBuildCoordinator.CoordinatorState>(); 3224var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3304var wait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 3318var retry = completion.Callback(app.Services, TestContext.Current.CancellationToken); 3345var canceledWait = completion.Callback(app.Services, canceled.Token); 3346var otherWait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 3362await completion.Callback(app.Services, TestContext.Current.CancellationToken); 3387await completion.Callback(app.Services, TestContext.Current.CancellationToken); 3396var wait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 3430var wait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 3436var retry = completion.Callback(app.Services, TestContext.Current.CancellationToken); 3463var coordinator = app.Services.GetRequiredService<DotnetProjectBuildCoordinator.CoordinatorState>(); 3486app.Services, 3600app.Services.GetRequiredService<ResourceLoggerService>(), 3659var orchestrator = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 4048var coordinator = app.Services.GetRequiredService<DotnetProjectBuildCoordinator.CoordinatorState>(); 4049var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4051new BeforeStartEvent(app.Services, model), 4053await coordinator.MaterializeBuildPlan(model, app.Services);
DotnetProjectResourceTests.cs (27)
110var rendered = app.Services.GetRequiredService<ExecutableCreator>() 143app.Services.GetRequiredService<ExecutableCreator>().PrepareObjects(TestContext.Current.CancellationToken).ToArray()); 331var runtime = await app.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(cancellation.Token); 332var logger = app.Services.GetRequiredService<ILogger<DotnetProjectResourceTests>>(); 351var processRunner = app.Services.GetRequiredService<IProcessRunner>(); 359var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 410var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 435var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 535new BeforeResourceStartedEvent(rebuilder, app.Services), 537var args = await ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services); 706var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 768var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 794var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 820var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 839var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 874var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 898var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 930var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 962var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 992var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 1035var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 1063var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 1104var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1106app.Services.GetRequiredService<DistributedApplicationModel>(), 1107app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1108app.Services, 1109app.Services.GetRequiredService<ILogger<DotnetProjectResourceTests>>(),
Aspire.Hosting.EntityFrameworkCore.Tests (19)
AddEFMigrationsTests.cs (2)
81var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 297var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
EFBuildCustomizationWarningTests.cs (4)
75migrations.Resource, logger, TestContext.Current.CancellationToken, app.Services, tool.Resource); 118TestContext.Current.CancellationToken, app.Services, tool.Resource); 151TestContext.Current.CancellationToken, app.Services, tool.Resource); 181migrations.Resource, logger, TestContext.Current.CancellationToken, app.Services, tool.Resource);
EFBuildReadinessTests.cs (8)
37var execution = app.Services.GetRequiredService<ResourceCommandService>().ExecuteCommandAsync( 72new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()), token); 104new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()), token); 141var commands = app.Services.GetRequiredService<ResourceCommandService>(); 179migrations.Resource, NullLogger.Instance, TestContext.Current.CancellationToken, app.Services, tool.Resource); 203migrations.Resource, NullLogger.Instance, TestContext.Current.CancellationToken, app.Services, tool.Resource);
EFCoreOperationExecutorTests.cs (2)
147app.Services, 168app.Services,
EFMigrationPipelineTests.cs (2)
51app.Services.GetRequiredService<DistributedApplicationModel>(), builder.ExecutionContext, app.Services,
EFMigrationWaitForTests.cs (1)
103var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Foundry.Tests (21)
HostedAgentExtensionTests.cs (10)
150app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 427app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 594app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 621app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 644app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 687app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 719app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 742app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 926var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 928await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
ProjectResourceTests.cs (2)
85var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 107var model = app.Services.GetRequiredService<DistributedApplicationModel>();
ToolboxTests.cs (9)
801var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 829Services = app.Services, 851var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 865Services = app.Services, 891var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 912Services = app.Services, 926var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 943var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 945return new PipelineContext(model, execContext, app.Services, NullLogger.Instance, CancellationToken.None);
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.Go.Tests (4)
AddGoAppTests.cs (4)
494var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 568var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 600var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 633var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services);
Aspire.Hosting.Java.Tests (24)
AddJavaAppPublishTests.cs (4)
1234var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1239var args = await ArgumentEvaluator.GetArgumentListAsync(published, app.Services); 2374var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2385Services = app.Services,
AddJavaAppTests.cs (5)
747new BeforeResourceStartedEvent(app.Resource, built.Services), 766new BeforeResourceStartedEvent(app.Resource, built.Services), 793new BeforeResourceStartedEvent(app.Resource, built.Services), 854new BeforeResourceStartedEvent(app.Resource, built.Services), 914Services = app.Services
AddJavaContainerTests.cs (3)
119app.Resource, serviceProvider: built.Services.GetRequiredService<IServiceProvider>()); 121var dcpInfo = await built.Services.GetRequiredService<IDcpDependencyCheckService>().GetDcpInfoAsync(); 139app.Resource, serviceProvider: built.Services.GetRequiredService<IServiceProvider>());
AddQuarkusAppTests.cs (3)
97new BeforeResourceStartedEvent(app.Resource, application.Services), 114new BeforeResourceStartedEvent(app.Resource, application.Services), 286new BeforeResourceStartedEvent(app.Resource, application.Services),
AddSpringBootAppTests.cs (9)
22new BeforeResourceStartedEvent(app.Resource, application.Services), 39new BeforeResourceStartedEvent(app.Resource, application.Services), 56new BeforeResourceStartedEvent(app.Resource, application.Services), 76new BeforeResourceStartedEvent(runApp.Resource, application.Services), 114new BeforeResourceStartedEvent(app.Resource, application.Services), 137new BeforeResourceStartedEvent(app.Resource, application.Services), 190new BeforeResourceStartedEvent(app.Resource, application.Services), 211new BeforeResourceStartedEvent(runApp.Resource, application.Services), 238new BeforeResourceStartedEvent(app.Resource, application.Services),
Aspire.Hosting.JavaScript.Tests (82)
AddBunAppTests.cs (3)
151var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 173var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 199var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AddDenoAppTests.cs (11)
1261var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1283var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1310var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1331var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1356var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1384var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1496var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1511var appModel = distributedApplication.Services.GetRequiredService<DistributedApplicationModel>(); 1528var appModel = distributedApplication.Services.GetRequiredService<DistributedApplicationModel>(); 1546var appModel = distributedApplication.Services.GetRequiredService<DistributedApplicationModel>(); 1705var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AddJavaScriptAppTests.cs (5)
220var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 260app.Services.GetRequiredService<DistributedApplicationModel>(), 261app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 262app.Services, 263app.Services.GetRequiredService<ILogger<AddJavaScriptAppTests>>(),
AddNodeAppTests.cs (7)
244var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 271var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 301var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 482var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 509var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 526var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 547var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AddViteAppTests.cs (23)
502var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 527var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 558var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 572ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 618var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 632ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 670var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 719var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 730ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 765var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 782ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 828var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 841ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 904var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 914ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 1005var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1019ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 1091app.Services.GetRequiredService<DistributedApplicationModel>(), 1092app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1093app.Services, 1094app.Services.GetRequiredService<ILogger<AddViteAppTests>>(), 1105var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1110ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }),
AddViteAppWithPnpmTests.cs (4)
21var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 56var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 87var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 118var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
IntegrationTests.cs (2)
25var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 67var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
PackageInstallationTests.cs (17)
32var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 64var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 88var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 127var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 157var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 196var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 225var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 249var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 270var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 294var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 324var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 352var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 379var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 401var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 423var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 443var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 574var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
RequiredCommandTests.cs (2)
232var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 233await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel));
ResourceCreationTests.cs (8)
20var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 38var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 56var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 76var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 99var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 136var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 171var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 203var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Kafka.Tests (14)
AddKafkaTests.cs (14)
26var registration = Assert.Single(app.Services.GetRequiredService<IOptions<HealthCheckServiceOptions>>().Value.Registrations); 28var exception = Assert.Throws<InvalidOperationException>(() => registration.Factory(app.Services)); 31await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(kafka.Resource, app.Services)); 33var check = Assert.IsType<KafkaHealthCheck>(registration.Factory(app.Services)); 34Assert.Same(check, app.Services.GetRequiredKeyedService<KafkaHealthCheck>(registration.Name)); 47await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(kafka1.Resource, app.Services)); 48await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(kafka2.Resource, app.Services)); 50var registrations = app.Services.GetRequiredService<IOptions<HealthCheckServiceOptions>>().Value.Registrations; 64var check = app.Services.GetRequiredKeyedService<KafkaHealthCheck>(registration.Name); 68using var scope = app.Services.CreateScope(); 85var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 127var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 290var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 295new BeforeResourceStartedEvent(kafkaUiResource, app.Services),
Aspire.Hosting.Keycloak.Tests (6)
KeycloakPublicApiTests.cs (2)
165var entries = await containerAnnotation.Callback(new() { Model = keycloakResource, Services = app.Services }, CancellationToken.None); 190var entries = await containerAnnotation.Callback(new() { Model = keycloakResource, Services = app.Services }, CancellationToken.None);
KeycloakResourceBuilderTests.cs (4)
27var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 78var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 80var beforeStartEvent = new BeforeStartEvent(app.Services, model); 92var env = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(keycloak.Resource, serviceProvider: app.Services);
Aspire.Hosting.Kubernetes.Tests (58)
CertManagerTests.cs (11)
96app.Services.GetRequiredService<DistributedApplicationModel>(), 98app.Services, logger, TestContext.Current.CancellationToken), 128app.Services.GetRequiredService<DistributedApplicationModel>(), certManager.Resource, issuer.Resource, 241var steps = await PipelineStepTestHelpers.CreateStepsAsync(app.Services, certManager.Resource); 248PipelineStepTestHelpers.RunStepAsync(app.Services, apply)); 353app.Services.GetRequiredService<DistributedApplicationModel>(), certManager.Resource, issuer.Resource, 382var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 482var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 525var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 562var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 618var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
KubernetesDeployTests.cs (23)
28var env = app.Services.GetRequiredService<DistributedApplicationModel>() 45var env = app.Services.GetRequiredService<DistributedApplicationModel>() 59var env = app.Services.GetRequiredService<DistributedApplicationModel>() 74var env = app.Services.GetRequiredService<DistributedApplicationModel>() 89var env = app.Services.GetRequiredService<DistributedApplicationModel>() 109var env = app.Services.GetRequiredService<DistributedApplicationModel>() 127var env = app.Services.GetRequiredService<DistributedApplicationModel>() 144var env = app.Services.GetRequiredService<DistributedApplicationModel>() 161var env = app.Services.GetRequiredService<DistributedApplicationModel>() 176var env = app.Services.GetRequiredService<DistributedApplicationModel>() 191var env = app.Services.GetRequiredService<DistributedApplicationModel>() 208var env = app.Services.GetRequiredService<DistributedApplicationModel>() 225var env = app.Services.GetRequiredService<DistributedApplicationModel>() 245var env = app.Services.GetRequiredService<DistributedApplicationModel>() 262var env = app.Services.GetRequiredService<DistributedApplicationModel>() 278var env = app.Services.GetRequiredService<DistributedApplicationModel>() 294var env = app.Services.GetRequiredService<DistributedApplicationModel>() 720var env = app.Services.GetRequiredService<DistributedApplicationModel>() 814var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 816app.Services.GetRequiredService<DistributedApplicationModel>(), 817app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 818app.Services, 819app.Services.GetRequiredService<Microsoft.Extensions.Logging.ILogger<KubernetesDeployTests>>(),
KubernetesEnvironmentResourceTests.cs (2)
166var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 246var model = app.Services.GetRequiredService<DistributedApplicationModel>();
KubernetesGatewayTests.cs (6)
266var steps = await CreateStepsAsync(app.Services, k8s.Resource); 361var steps = await CreateStepsAsync(app.Services, k8s.Resource); 484var steps = await CreateStepsAsync(app.Services, k8s.Resource); 626var steps = await CreateStepsAsync(app.Services, k8s.Resource); 629await RunStepAsync(app.Services, prepareStep); 630await RunStepAsync(app.Services, prepareStep);
KubernetesIngressTests.cs (4)
396var steps = await PipelineStepTestHelpers.CreateStepsAsync(app.Services, k8s.Resource); 462var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 497var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 528var model = app.Services.GetRequiredService<DistributedApplicationModel>();
KubernetesPersistentVolumeRunModeTests.cs (11)
29var store = app.Services.GetRequiredService<IAspireStore>(); 36serviceProvider: app.Services); 43serviceProvider: app.Services); 64serviceProvider: app.Services); 67serviceProvider: app.Services); 89serviceProvider: app.Services); 92serviceProvider: app.Services); 182serviceProvider: app.Services); 258serviceProvider: app.Services); 285var store = app.Services.GetRequiredService<IAspireStore>(); 288serviceProvider: app.Services);
KubernetesPublisherTests.cs (1)
2229var store = app.Services.GetRequiredService<IAspireStore>();
Aspire.Hosting.Maui.Tests (69)
MauiBuildQueueTests.cs (20)
404var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 405var loggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 406var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 407var execContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>(); 412app.Services.GetRequiredService<ResourceCommandService>()); 417new BeforeResourceStartedEvent(android, app.Services), 437var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 438var loggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 439var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 440var execContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>(); 448app.Services.GetRequiredService<ResourceCommandService>()); 455new BeforeResourceStartedEvent(android, app.Services), 1340public IServiceProvider Services => App.Services; 1341public IDistributedApplicationEventing Eventing => App.Services.GetRequiredService<IDistributedApplicationEventing>(); 1342public ResourceNotificationService NotificationService => App.Services.GetRequiredService<ResourceNotificationService>(); 1421var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1422var loggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1423var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 1424var execContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>(); 1426var resourceCommandService = app.Services.GetRequiredService<ResourceCommandService>();
MauiiOSValidationTests.cs (12)
35await app.Services.GetRequiredService<IDistributedApplicationEventing>() 36.PublishAsync(new BeforeResourceStartedEvent(device.Resource, app.Services), CancellationToken.None) 61await app.Services.GetRequiredService<IDistributedApplicationEventing>() 62.PublishAsync(new BeforeResourceStartedEvent(simulator.Resource, app.Services), CancellationToken.None) 86await app.Services.GetRequiredService<IDistributedApplicationEventing>() 87.PublishAsync(new BeforeResourceStartedEvent(device.Resource, app.Services), CancellationToken.None) 107await app.Services.GetRequiredService<IDistributedApplicationEventing>() 108.PublishAsync(new BeforeResourceStartedEvent(simulator.Resource, app.Services), CancellationToken.None) 126await app.Services.GetRequiredService<IDistributedApplicationEventing>() 127.PublishAsync(new BeforeResourceStartedEvent(device.Resource, app.Services), CancellationToken.None) 145await app.Services.GetRequiredService<IDistributedApplicationEventing>() 146.PublishAsync(new BeforeResourceStartedEvent(simulator.Resource, app.Services), CancellationToken.None)
MauiPlatformExtensionsTests.cs (37)
295await app.Services.GetRequiredService<IDistributedApplicationEventing>() 296.PublishAsync(new BeforeResourceStartedEvent(platform.Resource, app.Services), CancellationToken.None) 580var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 585app.Services.GetRequiredService<ResourceLoggerService>(), 586app.Services.GetRequiredService<ResourceNotificationService>(), 587app.Services.GetRequiredService<IFileSystemService>()) 590app.Services.GetRequiredService<ResourceLoggerService>(), 591app.Services.GetRequiredService<ResourceNotificationService>(), 592app.Services.GetRequiredService<IFileSystemService>()); 594await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services), CancellationToken.None).DefaultTimeout(); 775await appBuilder.Eventing.PublishAsync(new ResourceEndpointsAllocatedEvent(dashboard.Resource, app.Services), CancellationToken.None).DefaultTimeout(); 789app.Services).DefaultTimeout(); 832new ResourceEndpointsAllocatedEvent(dashboard.Resource, app.Services), 844new ResourceEndpointsAllocatedEvent(dashboard.Resource, app.Services), 855app.Services).DefaultTimeout(); 892new ResourceEndpointsAllocatedEvent(dashboard.Resource, app.Services), 921await app.Services.GetRequiredService<ResourceNotificationService>() 942new ResourceEndpointsAllocatedEvent(dashboard.Resource, app.Services), 995await appBuilder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()), CancellationToken.None).DefaultTimeout(); 999await appBuilder.Eventing.PublishAsync(new ResourceEndpointsAllocatedEvent(dashboard.Resource, app.Services), CancellationToken.None).DefaultTimeout(); 1012app.Services).DefaultTimeout(); 1048app.Services).DefaultTimeout(); 1115app.Services).AsTask(); 1119appBuilder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnelConfig.DevTunnel.Resource, app.Services), CancellationToken.None).DefaultTimeout()); 1145appBuilder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnelConfig.DevTunnel.Resource, app.Services), CancellationToken.None).DefaultTimeout()); 1175new BeforeResourceStartedEvent(tunnelConfig.DevTunnel.Resource, app.Services), 1218await app.Services.GetRequiredService<ResourceNotificationService>() 1226new BeforeResourceStartedEvent(resolutionEventResource, app.Services), 1234app.Services).AsTask(); 1238await app.Services.GetRequiredService<ResourceNotificationService>() 1250new BeforeResourceStartedEvent(resolutionEventResource, app.Services), 1259app.Services).DefaultTimeout(); 1290app.Services).DefaultTimeout()); 1329var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1338app.Services).AsTask(); 1342new BeforeResourceStartedEvent(tunnelConfig.DevTunnel.Resource, app.Services),
Aspire.Hosting.Milvus.Tests (3)
AddMilvusTests.cs (3)
25var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 55var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 190var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.MongoDB.Tests (43)
AddMongoDBTests.cs (24)
45var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 73var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 104var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 140await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 170await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 398var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 468var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 469await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 493var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 494await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 519var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 520await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 540var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 541await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 578var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 579await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 619var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 620await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 639var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 640await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 657var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 658await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel));
ReplicaSet\AddMongoDBReplicaSetTests.cs (12)
36var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 86var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 107var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 124var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 223var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 224await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 332var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 333var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 348await eventing.PublishAsync(new ResourceStoppedEvent(mongo1.Resource, app.Services, stoppedResourceEvent)); 352await eventing.PublishAsync(new BeforeResourceStartedEvent(mongo1.Resource, app.Services)); 358await eventing.PublishAsync(new ResourceReadyEvent(mongo1.Resource, app.Services), staleReadyCts.Token); 362await eventing.PublishAsync(new ResourceReadyEvent(mongo1.Resource, app.Services));
SingleMemberReplicaSetFunctionalTests.cs (1)
205var orchestrator = app.Services.GetRequiredService<ApplicationOrchestratorProxy>();
SingleMemberReplicaSetTests.cs (2)
125await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()));
tests\Shared\ContainerReplCommandTestBase.cs (4)
55Services = app.Services, 75var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 86Services = app.Services, 109Services = app.Services,
Aspire.Hosting.MySql.Tests (15)
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>(); 260await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 288var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 291builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 380var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 396var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 401new BeforeResourceStartedEvent(phpMyAdminResource, app.Services),
MySqlFunctionalTests.cs (1)
590var rns = app.Services.GetRequiredService<ResourceNotificationService>();
tests\Shared\ContainerReplCommandTestBase.cs (4)
55Services = app.Services, 75var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 86Services = app.Services, 109Services = app.Services,
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 (18)
AddPostgresTests.cs (8)
53var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 107var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 177var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 222var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 403var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 524var entries = await createServers.Callback(new() { Model = pgadmin, Services = app.Services }, CancellationToken.None); 578var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 588var entries = await createBookmarks.Callback(new() { Model = pgweb, Services = app.Services }, CancellationToken.None);
PostgresFunctionalTests.cs (1)
572var rns = app.Services.GetRequiredService<ResourceNotificationService>();
PostgresMcpBuilderTests.cs (5)
27var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 55var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 88var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 111var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 128var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
tests\Shared\ContainerReplCommandTestBase.cs (4)
55Services = app.Services, 75var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 86Services = app.Services, 109Services = app.Services,
Aspire.Hosting.Python.Tests (53)
AddPythonAppTests.cs (53)
155var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 194var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 237var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 413var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 446var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 507var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 538var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 574var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 623var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 658var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 701var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 735var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 766var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 786var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 825var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 844var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 869var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 900var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 925var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 944var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 963var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 984var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1020var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1054var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1086var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1110var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1132var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1158var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1411var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1455var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1495var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1667var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 2028var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2063var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2117var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2138var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2165var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2193var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2217var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2249var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2292var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2322var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2358var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2394var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2423var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2455var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2485var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2518var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2550var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2575var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2590var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2591var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 2592await eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel), CancellationToken.None);
Aspire.Hosting.Qdrant.Tests (4)
AddQdrantTests.cs (4)
52var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 91var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 124var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 417var 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.Radius.Tests (127)
CloudProviders\ConflictingCredentialsTests.cs (5)
31var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 51var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 67var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 87var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 103var model = app.Services.GetRequiredService<DistributedApplicationModel>();
CloudProviders\MultiEnvironmentProvidersTests.cs (1)
70var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Deployment\DeployPipelineIntegrationTests.cs (3)
23var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 129var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 158var model = app.Services.GetRequiredService<DistributedApplicationModel>();
DeploymentE2E\DeployEndToEndTests.cs (2)
36var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 69var model = app.Services.GetRequiredService<DistributedApplicationModel>();
InnerLoop\GracefulDegradationTests.cs (3)
28var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 66var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 89var model = app.Services.GetRequiredService<DistributedApplicationModel>();
InnerLoop\MultiEnvironmentTests.cs (3)
21var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 66var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 87var model = app.Services.GetRequiredService<DistributedApplicationModel>();
InnerLoop\RadiusInfrastructureInitializationTests.cs (6)
28var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 47var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 67var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 85var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 102var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 122var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\BackingResourceContractTests.cs (1)
230_ = builder.Build().Services.GetRequiredService<DistributedApplicationModel>();
Publishing\BackingResourceProjectionTests.cs (5)
38var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 172var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 248var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 273var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 302var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\BackingResourceValueResolutionTests.cs (1)
25var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\BicepGenerationMultiResourceTests.cs (5)
25var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 50var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 70var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 89var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 108var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\BicepGenerationSimpleTests.cs (9)
25var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 45var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 64var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 82var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 102var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 123var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 144var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 167var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 183var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\BicepIdentifierTests.cs (2)
54var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 105var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\BicepSyntaxValidationTests.cs (6)
24var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 42var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 63var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 84var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 103var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 152var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\ConfigureRadiusInfrastructureTests.cs (22)
32var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 56var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 80var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 108var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 153var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 189var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 236var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 263var model = instance.Services.GetRequiredService<DistributedApplicationModel>(); 297var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 325var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 350var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 376var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 406var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 432var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 462var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 493var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 518var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 543var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 574var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 598var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 629var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 669var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\ConnectionStringPropagationTests.cs (5)
24var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 47var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 65var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 87var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 108var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\ContainerEnvironmentEmissionTests.cs (8)
32var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 54var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 77var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 103var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 122var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 147var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 169var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 191var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\ContainerSecretEnvironmentTests.cs (1)
39var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\ExistingSecretStoreBicepTests.cs (1)
24var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\InlineSecretStoreBicepTests.cs (1)
22var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\LegacyFallbackEmissionTests.cs (1)
35var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\MultiEnvironmentPublishTests.cs (4)
23var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 41var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 62var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 85var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\PostCallbackSecretValidationTests.cs (1)
61var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\ProviderScopeBicepEmissionTests.cs (4)
29var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 53var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 83var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 111var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\RadiusDeployParametersTests.cs (9)
32var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 56var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 113var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 153var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 176var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 205var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 232var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 262var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 288var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\SealedSecretPublishTests.cs (3)
44var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 134var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 208var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\SecretStoreConsumerBicepTests.cs (2)
30var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 55var model = app.Services.GetRequiredService<DistributedApplicationModel>();
RadiusEnvironmentResourceTests.cs (4)
89var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 119var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 144var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 166var model = app.Services.GetRequiredService<DistributedApplicationModel>();
RadiusExtensionsTests.cs (1)
47var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Recipes\RecipePackParametersBicepTests.cs (1)
15var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Recipes\RecipeParameterAdvancedTests.cs (1)
15var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Secrets\AddRadiusSecretStoreTests.cs (3)
27var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 43var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 372var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Secrets\SecretStoreDefaultPathTests.cs (2)
23var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 40var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Secrets\SecretStoreValidationTests.cs (1)
37var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Redis.Tests (39)
AddRedisTests.cs (30)
39var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 67var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 98var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 117var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 134var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 151var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 176var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 205var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 231var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 300var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 301var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 304await eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 326var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 327var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 330await eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 532var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 563await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 589await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 610await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 813var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 839var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 934var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 937var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 973var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 975await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 977var args = await ArgumentEvaluator.GetArgumentListAsync(redis.Resource, app.Services).AsTask().WaitAsync(TimeSpan.FromSeconds(60)); 1007var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1010var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 1035var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1038var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
RedisFunctionalTests.cs (5)
295var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 630var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 665var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 784var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 794var clientFactory = app.Services.GetRequiredService<IHttpClientFactory>();
tests\Shared\ContainerReplCommandTestBase.cs (4)
55Services = app.Services, 75var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 86Services = app.Services, 109Services = app.Services,
Aspire.Hosting.Rust.Tests (7)
AddRustAppPublishTests.cs (6)
128var logger = app.Services.GetRequiredService<ILogger<AddRustAppPublishTests>>(); 130app.Services, 258var logger = app.Services.GetRequiredService<ILogger<AddRustAppPublishTests>>(); 261app.Services, 315var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 327Services = app.Services,
RustDebugArgsTests.cs (1)
39var args = await ArgumentEvaluator.GetArgumentListAsync(rust.Resource, app.Services);
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 (15)
AddSqlServerTests.cs (11)
47var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 94var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 116var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 280var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 314var registrations = app.Services.GetRequiredService<IOptions<HealthCheckServiceOptions>>().Value.Registrations; 318Assert.Equal("Connection string is unavailable", Assert.Throws<InvalidOperationException>(() => serverRegistration.Factory(app.Services)).Message); 319Assert.Equal("Connection string is unavailable", Assert.Throws<InvalidOperationException>(() => dbRegistration.Factory(app.Services)).Message); 321await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(sqlServer.Resource, app.Services)); 322await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(db.Resource, app.Services)); 324Assert.IsType<SqlServerHealthCheck>(serverRegistration.Factory(app.Services)); 325Assert.IsType<SqlServerHealthCheck>(dbRegistration.Factory(app.Services));
tests\Shared\ContainerReplCommandTestBase.cs (4)
55Services = app.Services, 75var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 86Services = app.Services, 109Services = app.Services,
Aspire.Hosting.Testing (10)
DistributedApplicationFactory.cs (2)
171_shutdownTimeout = application.Services.GetService<IOptions<HostOptions>>()?.Value.ShutdownTimeout ?? _shutdownTimeout; 410_hostApplicationLifetime = app.Services.GetService<IHostApplicationLifetime>()
DistributedApplicationHostingTestingExtensions.cs (7)
71var executionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>(); 77var applicationOptions = app.Services.GetRequiredService<DistributedApplicationOptions>(); 91var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 112var browserToken = app.Services.GetRequiredService<IConfiguration>()["AppHost:BrowserToken"]; 154var clientFactory = app.Services.GetRequiredService<IHttpClientFactory>(); 255var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 295var lifetime = app.Services.GetRequiredService<IHostApplicationLifetime>();
DistributedApplicationTestingBuilder.cs (1)
583public IServiceProvider Services => innerApp.Services;
Aspire.Hosting.Testing.Tests (18)
DashboardTestingBuilderTests.cs (4)
104Assert.False(app.Services.GetRequiredService<IInteractionService>().IsAvailable); 107app.Services.GetRequiredService<IOptions<ResourceNotificationServiceOptions>>().Value.DefaultWaitBehavior); 198var dashboardOptions = app.Services.GetRequiredService<IOptions<DashboardOptions>>().Value; 211var dashboardOptions = app.Services.GetRequiredService<IOptions<DashboardOptions>>().Value;
TestingBuilderTests.cs (7)
51Assert.Same(app.Services.GetRequiredService<IFileSystemService>(), fileSystemService); 124var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 186var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 427var hostEnvironment = app.Services.GetRequiredService<IHostEnvironment>(); 443var config = app.Services.GetRequiredService<IConfiguration>(); 605var dashboardServiceHost = app.Services.GetRequiredService<DashboardServiceHost>(); 633var dashboardServiceHost = app.Services.GetRequiredService<DashboardServiceHost>();
TestingFactoryTests.cs (3)
43var appModel = _app.Services.GetRequiredService<DistributedApplicationModel>(); 65var appModel = _app.Services.GetRequiredService<IHostEnvironment>(); 74var config = _app.Services.GetRequiredService<IConfiguration>();
tests\Aspire.Hosting.TestUtilities\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 (1020)
AddConnectionStringTests.cs (2)
27var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 56var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AddParameterTests.cs (13)
27var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 143var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 338var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 374var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 407var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 446var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 527var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 596var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 628var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1095var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1119var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1142var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1168var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AppHostSmokeTests.cs (1)
92var dcpOptions = host.Services.GetRequiredService<IOptions<DcpOptions>>();
AspireStoreTests.cs (4)
38var store = app.Services.GetRequiredService<IAspireStore>(); 67var store = app.Services.GetRequiredService<IAspireStore>(); 78var store = app.Services.GetRequiredService<IAspireStore>(); 155return app.Services.GetRequiredService<IAspireStore>();
Backchannel\AppHostRpcTargetCancellationTests.cs (9)
28var target = app.Services.GetRequiredService<AppHostRpcTarget>(); 48var target = app.Services.GetRequiredService<AppHostRpcTarget>(); 75var target = app.Services.GetRequiredService<AppHostRpcTarget>(); 103var target = app.Services.GetRequiredService<AppHostRpcTarget>(); 122var target = app.Services.GetRequiredService<AppHostRpcTarget>(); 147var target = app.Services.GetRequiredService<AppHostRpcTarget>(); 174var target = app.Services.GetRequiredService<AppHostRpcTarget>(); 193var target = app.Services.GetRequiredService<AppHostRpcTarget>(); 218var target = app.Services.GetRequiredService<AppHostRpcTarget>();
Backchannel\AppHostRpcTargetTests.cs (2)
28var target = app.Services.GetRequiredService<AppHostRpcTarget>(); 43var target = app.Services.GetRequiredService<AppHostRpcTarget>();
Backchannel\AppHostRpcTargetUploadTests.cs (10)
18var target = app.Services.GetRequiredService<AppHostRpcTarget>(); 19var fileUploadStore = app.Services.GetRequiredService<IInteractionFileUploadStore>(); 53var target = app.Services.GetRequiredService<AppHostRpcTarget>(); 54var fileUploadStore = app.Services.GetRequiredService<IInteractionFileUploadStore>(); 79var target = app.Services.GetRequiredService<AppHostRpcTarget>(); 80var fileUploadStore = app.Services.GetRequiredService<IInteractionFileUploadStore>(); 105var target = app.Services.GetRequiredService<AppHostRpcTarget>(); 124var target = app.Services.GetRequiredService<AppHostRpcTarget>(); 142var target = app.Services.GetRequiredService<AppHostRpcTarget>(); 143var fileUploadStore = app.Services.GetRequiredService<IInteractionFileUploadStore>();
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (201)
133var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 145app.Services.GetRequiredService<IConfiguration>(), 146app.Services.GetRequiredService<ProfilingTelemetry>(), 147app.Services); 180var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 249app.Services.GetRequiredService<IConfiguration>(), 250app.Services.GetRequiredService<ProfilingTelemetry>(), 251app.Services); 345var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 359app.Services.GetRequiredService<IConfiguration>(), 360app.Services.GetRequiredService<ProfilingTelemetry>(), 361app.Services); 400await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 402var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 414app.Services.GetRequiredService<IConfiguration>(), 415app.Services.GetRequiredService<ProfilingTelemetry>(), 416app.Services); 449await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 451var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 464app.Services.GetRequiredService<IConfiguration>(), 465app.Services.GetRequiredService<ProfilingTelemetry>(), 466app.Services); 511await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 513var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 527app.Services.GetRequiredService<IConfiguration>(), 528app.Services.GetRequiredService<ProfilingTelemetry>(), 529app.Services); 541await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 587await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 589var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 601app.Services.GetRequiredService<IConfiguration>(), 602app.Services.GetRequiredService<ProfilingTelemetry>(), 603app.Services); 615await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 657await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 659var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 673app.Services.GetRequiredService<IConfiguration>(), 674app.Services.GetRequiredService<ProfilingTelemetry>(), 675app.Services); 728await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 730var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 743app.Services.GetRequiredService<IConfiguration>(), 744app.Services.GetRequiredService<ProfilingTelemetry>(), 745app.Services); 769app.Services.GetRequiredService<IConfiguration>(), 770app.Services.GetRequiredService<ProfilingTelemetry>(), 771app.Services); 817await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 819var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 835app.Services.GetRequiredService<IConfiguration>(), 836app.Services.GetRequiredService<ProfilingTelemetry>(), 837app.Services); 871await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 879var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 892app.Services.GetRequiredService<IConfiguration>(), 893app.Services.GetRequiredService<ProfilingTelemetry>(), 894app.Services); 927app.Services.GetRequiredService<IConfiguration>(), 928app.Services.GetRequiredService<ProfilingTelemetry>(), 929app.Services); 941var executionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>(); 975app.Services.GetRequiredService<IConfiguration>(), 976app.Services.GetRequiredService<ProfilingTelemetry>(), 977app.Services); 999var executionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>(); 1030await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 1032var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1044app.Services.GetRequiredService<IConfiguration>(), 1045app.Services.GetRequiredService<ProfilingTelemetry>(), 1046app.Services); 1081await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 1083var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1087app.Services.GetRequiredService<IConfiguration>(), 1088app.Services.GetRequiredService<ProfilingTelemetry>(), 1089app.Services); 1148var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1160app.Services.GetRequiredService<IConfiguration>(), 1161app.Services.GetRequiredService<ProfilingTelemetry>(), 1162app.Services); 1220var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1228app.Services.GetRequiredService<IConfiguration>(), 1229app.Services.GetRequiredService<ProfilingTelemetry>(), 1230app.Services); 1256var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1270app.Services.GetRequiredService<IConfiguration>(), 1271app.Services.GetRequiredService<ProfilingTelemetry>(), 1272app.Services); 1296var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1315app.Services.GetRequiredService<IConfiguration>(), 1316app.Services.GetRequiredService<ProfilingTelemetry>(), 1317app.Services); 1355var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1363app.Services.GetRequiredService<IConfiguration>(), 1364app.Services.GetRequiredService<ProfilingTelemetry>(), 1365app.Services); 1391var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1399app.Services.GetRequiredService<IConfiguration>(), 1400app.Services.GetRequiredService<ProfilingTelemetry>(), 1401app.Services); 1426app.Services.GetRequiredService<IConfiguration>(), 1427app.Services.GetRequiredService<ProfilingTelemetry>(), 1428app.Services); 1430var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1465app.Services.GetRequiredService<IConfiguration>(), 1466app.Services.GetRequiredService<ProfilingTelemetry>(), 1467app.Services); 1469var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1504app.Services.GetRequiredService<IConfiguration>(), 1505app.Services.GetRequiredService<ProfilingTelemetry>(), 1506app.Services); 1539app.Services.GetRequiredService<IConfiguration>(), 1540app.Services.GetRequiredService<ProfilingTelemetry>(), 1541app.Services); 1574app.Services.GetRequiredService<IConfiguration>(), 1575app.Services.GetRequiredService<ProfilingTelemetry>(), 1576app.Services); 1646var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1657app.Services.GetRequiredService<IConfiguration>(), 1658app.Services.GetRequiredService<ProfilingTelemetry>(), 1659app.Services); 1687app.Services.GetRequiredService<IConfiguration>(), 1688app.Services.GetRequiredService<ProfilingTelemetry>(), 1689app.Services); 1713var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1728app.Services.GetRequiredService<IConfiguration>(), 1729app.Services.GetRequiredService<ProfilingTelemetry>(), 1730app.Services); 1758var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1772app.Services.GetRequiredService<IConfiguration>(), 1773app.Services.GetRequiredService<ProfilingTelemetry>(), 1774app.Services); 1804var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1816app.Services.GetRequiredService<IConfiguration>(), 1817app.Services.GetRequiredService<ProfilingTelemetry>(), 1818app.Services); 1846var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1860app.Services.GetRequiredService<IConfiguration>(), 1861app.Services.GetRequiredService<ProfilingTelemetry>(), 1862app.Services); 1893var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1908app.Services.GetRequiredService<IConfiguration>(), 1909app.Services.GetRequiredService<ProfilingTelemetry>(), 1910app.Services); 1939var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1944var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1960app.Services.GetRequiredService<IConfiguration>(), 1961app.Services.GetRequiredService<ProfilingTelemetry>(), 1962app.Services); 1999var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 2018app.Services.GetRequiredService<IConfiguration>(), 2019app.Services.GetRequiredService<ProfilingTelemetry>(), 2020app.Services); 2054var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 2069app.Services.GetRequiredService<IConfiguration>(), 2070app.Services.GetRequiredService<ProfilingTelemetry>(), 2071app.Services); 2102var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 2109app.Services.GetRequiredService<IConfiguration>(), 2110app.Services.GetRequiredService<ProfilingTelemetry>(), 2111app.Services); 2163var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2168var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 2177app.Services.GetRequiredService<IConfiguration>(), 2178app.Services.GetRequiredService<ProfilingTelemetry>(), 2179app.Services); 2288app.Services.GetRequiredService<IConfiguration>(), 2289app.Services.GetRequiredService<ProfilingTelemetry>(), 2290app.Services); 2343app.Services.GetRequiredService<IConfiguration>(), 2344app.Services.GetRequiredService<ProfilingTelemetry>(), 2345app.Services); 2404app.Services.GetRequiredService<IConfiguration>(), 2405app.Services.GetRequiredService<ProfilingTelemetry>(), 2406app.Services); 2473app.Services.GetRequiredService<IConfiguration>(), 2474app.Services.GetRequiredService<ProfilingTelemetry>(), 2475app.Services); 2550app.Services.GetRequiredService<IConfiguration>(), 2551app.Services.GetRequiredService<ProfilingTelemetry>(), 2552app.Services); 2600app.Services.GetRequiredService<IConfiguration>(), 2601app.Services.GetRequiredService<ProfilingTelemetry>(), 2602app.Services); 2655app.Services.GetRequiredService<IConfiguration>(), 2656app.Services.GetRequiredService<ProfilingTelemetry>(), 2657app.Services); 2687app.Services.GetRequiredService<IConfiguration>(), 2688app.Services.GetRequiredService<ProfilingTelemetry>(), 2689app.Services); 2714app.Services.GetRequiredService<IConfiguration>(), 2715app.Services.GetRequiredService<ProfilingTelemetry>(), 2716app.Services); 2743app.Services.GetRequiredService<IConfiguration>(), 2744app.Services.GetRequiredService<ProfilingTelemetry>(), 2745app.Services); 2764app.Services.GetRequiredService<IConfiguration>(), 2765app.Services.GetRequiredService<ProfilingTelemetry>(), 2766app.Services); 2797app.Services.GetRequiredService<IConfiguration>(), 2798app.Services.GetRequiredService<ProfilingTelemetry>(), 2799app.Services);
Backchannel\AuxiliaryBackchannelTests.cs (18)
36var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 76var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 128var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 143var logs = app.Services.GetFakeLogCollector().GetSnapshot() 161var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 196var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 237var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 281var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 325var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 361var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 402var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 439var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 459var lifetime = app.Services.GetService<IHostApplicationLifetime>(); 488var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 530var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 573var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 617var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 640var collector = app.Services.GetFakeLogCollector();
Backchannel\GetTerminalInfoAsyncTests.cs (2)
299var terminalService = app.Services.GetRequiredService<TerminalService>(); 306var target = CreateTarget(app.Services);
BuildOnlyContainerValidationTests.cs (5)
102var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 104app.Services.GetRequiredService<DistributedApplicationModel>(), 105app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 106app.Services, 107app.Services.GetRequiredService<ILogger<BuildOnlyContainerValidationTests>>(),
Codespaces\CodespacesUrlRewriterTests.cs (1)
35var collector = app.Services.GetFakeLogCollector();
ContainerRegistryResourceTests.cs (29)
139var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 154var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 170var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 186var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 290var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 515var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 521var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 539var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 542var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 563var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 566var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 585var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 588var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 608var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 611var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 644var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 647var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 668var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 671var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 695var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 701var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 719var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 722var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 739var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 742var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 760var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 763var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 781var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 784var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
Dashboard\DashboardEventHandlersTests.cs (4)
91var factory = app.Services.GetRequiredService<ILoggerFactory>(); 92var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 93var resourceNotificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 94var configuration = app.Services.GetRequiredService<IConfiguration>();
Dashboard\DashboardOptionsTests.cs (3)
30var dashboardOptions = app.Services.GetRequiredService<IOptions<DashboardOptions>>().Value; 47var dashboardOptions = app.Services.GetRequiredService<IOptions<DashboardOptions>>().Value; 75var dashboardOptions = app.Services.GetRequiredService<IOptions<DashboardOptions>>().Value;
Dashboard\DashboardResourceTests.cs (31)
57var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 91var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 124var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 132var config = (await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.Services).DefaultTimeout()) 226var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 230var dashboardOptions = app.Services.GetRequiredService<IOptions<DashboardOptions>>().Value; 260var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 303var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 331var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 358var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 399var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 405var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.Services).DefaultTimeout(); 439var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 445var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.Services).DefaultTimeout(); 475var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 481var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.Services).DefaultTimeout(); 513var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 525var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.Services).DefaultTimeout(); 559var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 571var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.Services).DefaultTimeout(); 608var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 614var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.Services).DefaultTimeout(); 641var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 662var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 678var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 729var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 743var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 744var resourceNotificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 797var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 842var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 857app.Services.GetRequiredService<DistributedApplicationExecutionContext>(),
Dcp\DcpCliArgsTests.cs (7)
68var dcpOptions = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value; 84var dcpOptions = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value; 101var dcpOptions = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value; 120var dcpOptions = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value; 139var dcpOptions = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value; 194var dcpOptions = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value; 207var exception = Assert.Throws<InvalidOperationException>(() => app.Services.GetRequiredService<IOptions<DcpOptions>>().Value);
Dcp\DcpExecutorTests.cs (236)
55app.Services.GetRequiredService<DistributedApplicationModel>(), 145app.Services.GetRequiredService<DistributedApplicationModel>(), 237app.Services.GetRequiredService<DistributedApplicationModel>(), 295app.Services.GetRequiredService<DistributedApplicationModel>(), 339app.Services.GetRequiredService<DistributedApplicationModel>(), 366await using var executor = CreateAppExecutor(app.Services.GetRequiredService<DistributedApplicationModel>()); 386app.Services.GetRequiredService<DistributedApplicationModel>(), 408var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 434var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 456var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 480var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 564var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 600var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 657var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 697var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 732var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 773var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 812var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 834var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 856var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 880var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 914var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 984var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1022var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1053var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1093var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1118var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1155var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1173var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1202var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1237var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1280var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1318var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1346var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1377var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1409var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1439var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1479var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1522var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1559var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1603var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1641var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1682var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1716var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1754var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1801var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1843var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1893var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1915var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1951var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2055var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2127var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2220var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2283var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2373var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2474var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2554var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2639var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2734var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2890var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3022app.Services.GetRequiredService<DistributedApplicationModel>(), 3090app.Services.GetRequiredService<DistributedApplicationModel>(), 3125var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3178var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3234var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3328var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3452var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3522var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3601var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3720var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3782var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3847var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3939var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3986var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4029var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4066var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4111var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4140var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4175var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4305var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4388var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4406var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4439var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4510var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4559var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4594var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4641var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4683var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4722var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4747var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4782var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4813var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4843var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4880var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4903var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4950var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4974var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5009var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5054var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5086var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5122var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5162var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5193var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5224var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5254var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5283var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5349var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5398var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5450var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5477var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5514var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5540var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5575var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5615var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5655var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5699var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5745var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5787var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5829var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5866var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5884var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5945var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5982var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6037var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6088var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6137var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6231var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6264var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6312var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6349var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6390var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6426var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6468var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6510var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6552var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6589var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6626var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6629await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 6667var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6669await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 6702var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6741var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6783var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6818var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6866var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6923var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6975var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7020var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7091var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7195app.Services.GetRequiredService<DistributedApplicationModel>(), 7337app.Services.GetRequiredService<DistributedApplicationModel>(), 7424var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7514var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7629var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7682var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7730var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7774var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7816var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7855var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7913var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7953var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7980var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8034var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8074var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8125var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8171var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8212var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8257var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8293var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8332var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8369var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8405var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8440var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8491var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8529var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8564var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8603var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8638var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8702var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8734var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8774var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8828var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8883var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8934var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8987var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9020var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9064var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9106var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9153var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9195var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9232var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9276var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9352var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9426var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9488var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9547var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9583var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9620var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9717var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9749var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9799var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9834var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9875var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9914var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9959var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10005var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10058var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10111var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10150var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10178var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10212var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10256var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10300var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10339var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10378var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10446var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10500var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10542var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10599var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10649var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10695var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10756var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10826var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10863var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10954var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10995var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11046var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11087var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11147var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11154await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 11192var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11221var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11225await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 11267var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11271await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 11506var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Dcp\DcpHostNotificationTests.cs (7)
74var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 171var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 216var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 261var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 315var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 383var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 741return host.Services.GetRequiredService<IOptions<DcpOptions>>().Value;
Dcp\KubernetesServiceTests.cs (3)
43var service = app.Services.GetRequiredService<IKubernetesService>(); 44var locations = app.Services.GetRequiredService<Locations>(); 66Assert.Same(timeProvider, app.Services.GetRequiredService<TimeProvider>());
DistributedApplicationBuilderTests.cs (16)
55var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 58var eventingSubscribers = app.Services.GetServices<IDistributedApplicationEventingSubscriber>(); 68var options = app.Services.GetRequiredService<IOptions<PipelineOptions>>(); 79var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 90var pipelineOptions = app.Services.GetRequiredService<IOptions<PipelineOptions>>(); 101var pipelineOptions = app.Services.GetRequiredService<IOptions<PipelineOptions>>(); 112var config = app.Services.GetRequiredService<IConfiguration>(); 186var filterOptions = app.Services.GetRequiredService<IOptions<LoggerFilterOptions>>().Value; 210var outputService = app.Services.GetRequiredService<IPipelineOutputService>(); 222var outputService = app.Services.GetRequiredService<IPipelineOutputService>(); 233var outputService = app.Services.GetRequiredService<IPipelineOutputService>(); 243var config = app.Services.GetRequiredService<IConfiguration>(); 256var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger("AspireLogLevelTest"); 272var factory = app.Services.GetRequiredService<ILoggerFactory>(); 279var backchannel = app.Services.GetRequiredService<BackchannelLoggerProvider>(); 803var config = app.Services.GetRequiredService<IConfiguration>();
DistributedApplicationModelExtensionsTests.cs (2)
27var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 62var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
DistributedApplicationTests.cs (64)
200var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 201var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 202var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 245var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 246var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 247var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 341var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 384var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 385var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 538var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 539var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 540var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 625var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 626var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 627var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 779var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 836var s = app.Services.GetRequiredService<IKubernetesService>(); 893var s = app.Services.GetRequiredService<IKubernetesService>(); 937var s = app.Services.GetRequiredService<IKubernetesService>(); 1011var s = app.Services.GetRequiredService<IKubernetesService>(); 1012var dc = app.Services.GetRequiredService<IDeveloperCertificateService>(); 1105var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 1106var s = app.Services.GetRequiredService<IKubernetesService>(); 1143var s = app.Services.GetRequiredService<IKubernetesService>(); 1144var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1183var s = app.Services.GetRequiredService<IKubernetesService>(); 1184var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1212var events = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 1219var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1220var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 1221var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1259var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1260var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 1261var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1306var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1310var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1355var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1359var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1387var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1391var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1424var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1428var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1457var dashboardServiceHost = app.Services.GetRequiredService<DashboardServiceHost>(); 1487var dashboardServiceHost = app.Services.GetRequiredService<DashboardServiceHost>(); 1520var s = app.Services.GetRequiredService<IKubernetesService>(); 1522var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1548var s = app.Services.GetRequiredService<IKubernetesService>(); 1550var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1576var s = app.Services.GetRequiredService<IKubernetesService>(); 1578var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1605var s = app.Services.GetRequiredService<IKubernetesService>(); 1607var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1634var s = app.Services.GetRequiredService<IKubernetesService>(); 1857var s = app.Services.GetRequiredService<IKubernetesService>(); 1931var s = app.Services.GetRequiredService<IKubernetesService>(); 2021var s = app.Services.GetRequiredService<IKubernetesService>(); 2062var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 2118var rns = secondRun.App.Services.GetRequiredService<ResourceNotificationService>(); 2164var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 2215var s = app.Services.GetRequiredService<IKubernetesService>(); 2217var lifecycles = app.Services.GetServices<IDistributedApplicationLifecycleHook>(); 2244var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 2245var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 2309var rns = app.Services.GetRequiredService<ResourceNotificationService>();
DotnetProgramPublishingTests.cs (12)
180var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 208var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 218app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 219app.Services, 231var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 274var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 413var manager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 459resource.Resource, metadata, buildResult, app.Services, logger, TestContext.Current.CancellationToken)); 526var pipeline = Assert.IsType<DistributedApplicationPipeline>(app.Services.GetRequiredService<IDistributedApplicationPipeline>()); 528app.Services.GetRequiredService<DistributedApplicationModel>(), 529app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 530app.Services,
Eventing\DistributedApplicationBuilderEventingTests.cs (7)
172var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 322var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 331var testEvent = new ResourceStoppedEvent(resource.Resource, app.Services, testResourceEvent); 427var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 430var testEvent = new BeforePublishEvent(app.Services, new([])); 450var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 453var testEvent = new AfterPublishEvent(app.Services, new([]));
ExternalServiceTests.cs (4)
172var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, DistributedApplicationOperation.Publish, app.Services).DefaultTimeout(); 424var healthCheckService = app.Services.GetService<HealthCheckService>(); 445var healthCheckService = app.Services.GetService<HealthCheckService>(); 462var healthCheckService = app.Services.GetRequiredService<HealthCheckService>();
Health\FriendlyHealthCheckErrorMessagesTests.cs (4)
29var healthCheckService = app.Services.GetRequiredService<HealthCheckService>(); 69var healthCheckService = app.Services.GetRequiredService<HealthCheckService>(); 109var healthCheckService = app.Services.GetRequiredService<HealthCheckService>(); 147var healthCheckService = app.Services.GetRequiredService<HealthCheckService>();
Health\ResourceHealthCheckServiceTests.cs (6)
159var healthService = app.Services.GetRequiredService<ResourceHealthCheckService>(); 222var logger = app.Services.GetRequiredService<ILogger<ResourceHealthCheckServiceTests>>(); 223var rhcs = app.Services.GetRequiredService<ResourceHealthCheckService>(); 262var logger = app.Services.GetRequiredService<ILogger<ResourceHealthCheckServiceTests>>(); 263var rhcs = app.Services.GetRequiredService<ResourceHealthCheckService>(); 483var rhcs = app.Services.GetRequiredService<ResourceHealthCheckService>();
HealthCheckTests.cs (6)
93var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 94var registration = app.Services.GetRequiredService<IOptions<HealthCheckServiceOptions>>().Value.Registrations 97await eventing.PublishAsync(new ResourceEndpointsAllocatedEvent(resource.Resource, app.Services)); 99var healthCheck = registration.Factory(app.Services); 135var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 172var collector = app.Services.GetFakeLogCollector();
KestrelConfigTests.cs (1)
354var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Orchestrator\ApplicationOrchestratorTests.cs (31)
46var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 82var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 130var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 176var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 227var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 295var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 348var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 400var e = Assert.Throws<InvalidOperationException>(() => app.Services.GetService<ApplicationOrchestrator>()); 419var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 464var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 504var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 513await applicationEventing.PublishAsync(new ConnectionStringAvailableEvent(resource.Resource, app.Services), CancellationToken.None); 514await applicationEventing.PublishAsync(new ConnectionStringAvailableEvent(resource.Resource, app.Services), CancellationToken.None); 548var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 577var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 605var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 634var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 670var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 716var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 776var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 825var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 878var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 944var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 985var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1048var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1083var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1341var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1389var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1439var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1496var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1551var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Orchestrator\ParameterProcessorTests.cs (11)
758var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 783var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 803var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 829var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 852var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 874var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 899var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 930var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 968var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 972var parameterProcessor = app.Services.GetRequiredService<ParameterProcessor>(); 1001var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Orchestrator\RelationshipEvaluatorTests.cs (5)
49var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 81var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 104var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 127var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 150var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Pipelines\DistributedApplicationPipelineTests.cs (5)
1012app.Services.GetRequiredService<DistributedApplicationModel>(), 1013app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1014app.Services, 1015app.Services.GetRequiredService<ILogger<DistributedApplicationPipelineTests>>(), 2555var model = app.Services.GetRequiredService<DistributedApplicationModel>();
ProjectRebuilderResourceTests.cs (5)
31new BeforeResourceStartedEvent(rebuilder, app.Services), 35new BeforeResourceStartedEvent(rebuilder, app.Services), 37var args = await ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services); 67new BeforeResourceStartedEvent(rebuilder, app.Services), 69var args = await ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services);
ProjectResourceTests.cs (27)
129var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 236var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 259var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 286var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 304var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 320var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 370var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 390var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 433var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 476var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 498var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 523var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 553var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 572var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 596var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 644var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 744var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 775var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 793var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 811var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 830var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 848var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 893var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 930var fakeContainerRuntime = (FakeContainerRuntime)app.Services.GetRequiredService<IContainerRuntime>(); 990var imageManager = (MockImageBuilder)app.Services.GetRequiredService<IResourceContainerImageManager>(); 1071new BeforeResourceStartedEvent(appResource.Resource, app.Services), 1093var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\DotnetProgramArchiveTests.cs (7)
324var warnings = app.Services.GetFakeLogCollector().GetSnapshot() 365ExecutionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>() 483return app.Services.GetRequiredService<IResourceContainerImageManager>().BuildImageAsync(resource, cancellationToken); 486var pipeline = Assert.IsType<DistributedApplicationPipeline>(app.Services.GetRequiredService<IDistributedApplicationPipeline>()); 488app.Services.GetRequiredService<DistributedApplicationModel>(), 489app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 490app.Services,
Publishing\PipelineExecutorTests.cs (1)
40var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>();
Publishing\PodmanSaveArgumentsTests.cs (1)
115new ValueProviderContext { ExecutionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>() },
Publishing\ResourceContainerImageManagerTests.cs (75)
41var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 45var collector = app.Services.GetFakeLogCollector(); 77var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 103var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 107var collector = app.Services.GetFakeLogCollector(); 136var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 140var collector = app.Services.GetFakeLogCollector(); 173var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 177var collector = app.Services.GetFakeLogCollector(); 207var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 211var collector = app.Services.GetFakeLogCollector(); 237var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 241var collector = app.Services.GetFakeLogCollector(); 275var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 279var collector = app.Services.GetFakeLogCollector(); 319var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 323var collector = app.Services.GetFakeLogCollector(); 356var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 360var collector = app.Services.GetFakeLogCollector(); 388var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 392var collector = app.Services.GetFakeLogCollector(); 417var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 423var collector = app.Services.GetFakeLogCollector(); 468var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 474var collector = app.Services.GetFakeLogCollector(); 497var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 521var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 556var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 589var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 622var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 660var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 668var collector = app.Services.GetFakeLogCollector(); 699var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 722var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 763var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 768var collector = app.Services.GetFakeLogCollector(); 812var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 853var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 930var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 942ExecutionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>() 997var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1040var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1082var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1126var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1183var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1267var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1346var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1350var collector = app.Services.GetFakeLogCollector(); 1420var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1516var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1569var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1663var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1665app.Services, 1702var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1704app.Services, 1729var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1731app.Services, 1758var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1762app.Services, 1791var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1794app.Services, 1840var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1842app.Services, 1871var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1873app.Services, 1904var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1906app.Services, 1913Assert.Equal(app.Services, capturedServices); 1944var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1992var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 2027var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 2070var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 2103var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 2139var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 2149var containerRuntime = await app.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(cts.Token);
RequiredCommandAnnotationTests.cs (47)
138var subscribers = app.Services.GetServices<IDistributedApplicationEventingSubscriber>(); 152var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 154var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 156await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 168var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 170var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 173await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 186var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 188var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 191await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 211var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 213var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 214await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 238var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 240var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 241await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 262var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 264var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 267await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 283var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 285var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 288await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 303var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 306var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 309await eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 310await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services)); 335var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 338var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 340await eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 341await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services)); 370var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 373var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 375await eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 376await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services)); 395var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 397var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 400var publishTask = eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 427var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 429var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 431await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 452var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 455var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 458var publishTask1 = eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 464await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services)); 500var eventSubscribers = app.Services.GetServices<IDistributedApplicationEventingSubscriber>(); 501var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 502var execContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>();
ResourceCommandAnnotationTests.cs (2)
201Services = app.Services, 212Assert.Equal(app.Services.GetRequiredService<IHostApplicationLifetime>().ApplicationStopping, cancellationToken);
ResourceCommandServiceTests.cs (3)
1357var interactionService = app.Services.GetRequiredService<InteractionService>(); 1586var baselineIsAvailable = app.Services.GetRequiredService<IInteractionService>().IsAvailable; 1751var resourceNotificationService = app.Services.GetRequiredService<ResourceNotificationService>();
ResourceFailureLoggingTests.cs (3)
34logCollector = app.Services.GetFakeLogCollector(); 57logCollector = app.Services.GetFakeLogCollector(); 88var logCollector = app.Services.GetFakeLogCollector();
Terminals\ResourceTerminalCatalogTests.cs (3)
61var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 264var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 265await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
Terminals\TerminalServiceTests.cs (2)
56var service = app.Services.GetRequiredService<TerminalService>(); 796var service = app.Services.GetRequiredService<TerminalService>();
WaitForTests.cs (1)
576var collector = app.Services.GetFakeLogCollector();
WithEndpointTests.cs (2)
406var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1019var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
WithEnvironmentTests.cs (1)
30var serviceProvider = app.Services.GetRequiredService<IServiceProvider>();
WithHttpCommandTests.cs (1)
117var httpClientFactory = app.Services.GetService<IHttpClientFactory>();
WithMcpServerTests.cs (6)
32var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 55var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 80var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 105var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 130var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 155var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
WithOtlpExporterTests.cs (12)
43var serviceProvider = app.Services.GetRequiredService<IServiceProvider>(); 68var serviceProvider = app.Services.GetRequiredService<IServiceProvider>(); 93serviceProvider: app.Services).DefaultTimeout(); 115serviceProvider: app.Services).DefaultTimeout(); 138serviceProvider: app.Services).DefaultTimeout(); 171var serviceProvider = app.Services.GetRequiredService<IServiceProvider>(); 202var serviceProvider = app.Services.GetRequiredService<IServiceProvider>(); 231var serviceProvider = app.Services.GetRequiredService<IServiceProvider>(); 256var serviceProvider = app.Services.GetRequiredService<IServiceProvider>(); 312var serviceProvider = app.Services.GetRequiredService<IServiceProvider>(); 313var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 323var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
WithProcessCommandTests.cs (4)
438app.Services.GetRequiredService<IConfiguration>(), 439app.Services.GetRequiredService<ProfilingTelemetry>(), 440app.Services); 741var loggerService = app.Services.GetRequiredService<ResourceLoggerService>();
WithTerminalTests.cs (32)
343var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 344await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 350var environment = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(host, serviceProvider: app.Services); 364var parentEnvironment = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource.Resource, serviceProvider: app.Services); 398var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 399await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 405var environment = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(host, serviceProvider: app.Services); 434var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 435await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 512var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 513await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 602var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 603await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 654var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 655await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1050var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1051await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1066var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1067await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1084var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1085await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1414var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1415await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1436var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1437await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1461var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1462await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1483var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1484await Assert.ThrowsAsync<IOException>(async () => await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model))); 1527var cleanupService = app.Services.GetRequiredService<TerminalHostOrphanCleanupService>(); 1535var cleanupService = app.Services.GetRequiredService<TerminalHostOrphanCleanupService>(); 1536var executionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>();
WithUrlsTests.cs (8)
402var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 427var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 458var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 489var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 605var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 686var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 1075var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 1127var rns = app.Services.GetRequiredService<ResourceNotificationService>();
WithVolumeTests.cs (15)
29app.Services); 49var store = app.Services.GetRequiredService<IAspireStore>(); 58serviceProvider: app.Services); 61serviceProvider: app.Services); 82app.Services); 86app.Services); 143serviceProvider: app.Services); 147var storePrefix = Path.GetFullPath(app.Services.GetRequiredService<IAspireStore>().BasePath) + Path.DirectorySeparatorChar; 187serviceProvider: app.Services); 207var creator = app.Services.GetRequiredService<ContainerCreator>(); 224var store = app.Services.GetRequiredService<IAspireStore>(); 229serviceProvider: app.Services); 263app.Services)); 284app.Services); 302app.Services);
Aspire.Hosting.TestUtilities (10)
Utils\EventingTestHelpers.cs (3)
16var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 17var executionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>(); 18foreach (var subscriber in app.Services.GetServices<IDistributedApplicationEventingSubscriber>())
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));
Utils\PersistentContainerTestHelpers.cs (1)
113var resourceNotificationService = app.Services.GetRequiredService<ResourceNotificationService>();
Utils\TerminalCommandTestHelpers.cs (2)
19var terminals = app.Services.GetRequiredService<TerminalService>(); 25Services = app.Services,
Aspire.Hosting.Valkey.Tests (10)
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>();
tests\Shared\ContainerReplCommandTestBase.cs (4)
55Services = app.Services, 75var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 86Services = app.Services, 109Services = app.Services,
Aspire.Hosting.Yarp.Tests (8)
AddYarpTests.cs (8)
313Services = app.Services, 344Services = app.Services, 376Services = app.Services, 414Services = app.Services, 441var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 443var beforeStartEvent = new BeforeStartEvent(app.Services, model); 466var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 468var beforeStartEvent = new BeforeStartEvent(app.Services, model);
Aspire.Playground.Tests (10)
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.TestUtilities\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)
101var notifications = app.Services.GetRequiredService<ResourceNotificationService>();