Implemented interface member:
property
Services
Microsoft.Extensions.Hosting.IHost.Services
3342 references to Services
Aspire.Hosting (2)
DistributedApplication.cs (1)
327/// exposes a <see cref="Services"/> property which allows developers to get services from the
DistributedApplicationBuilder.cs (1)
931_executionContextOptions.Services = application.Services.GetRequiredService<IServiceProvider>();
Aspire.Hosting.Azure.EntraId.Tests (100)
EntraIdApiProvisioningTests.cs (3)
777var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 779var options = app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value; 782workspace.Path, options, app.Services, NullLogger<AzurePublishingContext>.Instance, step);
EntraIdAppRoleAssignmentTests.cs (3)
237var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 249workspace.Path, app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value, 250app.Services, NullLogger<AzurePublishingContext>.Instance, step);
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>();
EntraIdKeyVaultCertificateTests.cs (1)
240return app.Services.GetRequiredService<DistributedApplicationModel>()
EntraIdProvisioningTests.cs (42)
219var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 249var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 538var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 882var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 884var options = app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value; 887workspace.Path, options, app.Services, NullLogger<AzurePublishingContext>.Instance, step); 906var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 911app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value, 912app.Services, 932var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 936app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value, 937app.Services, 964var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 969app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value, 970app.Services, 995var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1000app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value, 1001app.Services, 1035var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1037var options = app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value; 1040workspace.Path, options, app.Services, NullLogger<AzurePublishingContext>.Instance, step); 1171_ = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 1173await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None); 1286_ = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 1287await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None); 1312_ = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 1314await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None); 1337_ = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 1339var publish = builder.Eventing.PublishResourceEndpointsAllocatedAsync(new(web.Resource, app.Services), cts.Token); 1347await using var logs = app.Services.GetRequiredService<ResourceLoggerService>() 1381_ = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 1382await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new(web.Resource, app.Services), CancellationToken.None); 1398_ = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 1400await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None); 1457_ = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 1458await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None); 1490_ = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 1491await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None); 1511_ = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 1512await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None); 1872node.Resource, DistributedApplicationOperation.Run, app.Services).AsTask(); 1946node.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>(); 1063var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1084var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1107var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1380var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
EntraIdStarterScenarioPublishTests.cs (3)
57var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 62app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value, 63app.Services,
LocalDeveloperCertificateProvisioningTests.cs (3)
26var original = await credential.GetCertificateAsync(app.Services, entra.Resource, TestContext.Current.CancellationToken); 38var reused = await reusedCredential.GetCertificateAsync(app.Services, entra.Resource, TestContext.Current.CancellationToken); 50var renewed = await nextRun.GetCertificateAsync(app.Services, entra.Resource, TestContext.Current.CancellationToken);
LocalDeveloperCertificateTests.cs (16)
29var store = app.Services.GetRequiredService<LocalDeveloperCertificateStore>(); 58Path.Combine(app.Services.GetRequiredService<IAspireStore>().BasePath, "dev-certs", "Entra", "entra-web.pfx"), 72var store = app.Services.GetRequiredService<LocalDeveloperCertificateStore>(); 91var firstStore = firstApp.Services.GetRequiredService<LocalDeveloperCertificateStore>(); 92var secondStore = secondApp.Services.GetRequiredService<LocalDeveloperCertificateStore>(); 108var store = app.Services.GetRequiredService<LocalDeveloperCertificateStore>(); 125var store = app.Services.GetRequiredService<LocalDeveloperCertificateStore>(); 160var store = app.Services.GetRequiredService<LocalDeveloperCertificateStore>(); 182var store = app.Services.GetRequiredService<LocalDeveloperCertificateStore>(); 202var store = app.Services.GetRequiredService<LocalDeveloperCertificateStore>(); 218var store = app.Services.GetRequiredService<LocalDeveloperCertificateStore>(); 247Assert.False(Directory.Exists(Path.Combine(app.Services.GetRequiredService<IAspireStore>().BasePath, "dev-certs"))); 249var certificate = await credential.GetCertificateAsync(app.Services, entra.Resource, TestContext.Current.CancellationToken); 324.GetCertificateAsync(app.Services, entra.Resource, TestContext.Current.CancellationToken); 357var first = await credential.GetCertificateAsync(app.Services, entra.Resource, TestContext.Current.CancellationToken); 359var second = await credential.GetCertificateAsync(app.Services, entra.Resource, TestContext.Current.CancellationToken);
Aspire.Hosting.Azure.Kubernetes.Tests (31)
AzureKubernetesEnvironmentExtensionsTests.cs (16)
359var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 807var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 851var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 873var roles = app.Services.GetRequiredService<DistributedApplicationModel>().Resources 891var roles = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources 925var roles = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<AzureRoleAssignmentResource>(); 958var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1021var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1063var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1090var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1122var operatorRole = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>() 1126var registryRole = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>() 1160Assert.Empty(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<AzureUserAssignedIdentityResource>()); 1175var roles = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources 1209var roles = app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<AzureRoleAssignmentResource>(); 1263var roles = app.Services.GetRequiredService<DistributedApplicationModel>().Resources
AzureKubernetesInfrastructureTests.cs (13)
36Assert.Empty(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<AksNodePoolResource>()); 1444var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1448app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1449app.Services, 1539var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1543app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1544app.Services, 1769var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1773app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1774app.Services, 1842var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1846app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1847app.Services,
AzureKubernetesPersistentVolumeTests.cs (2)
61var store = app.Services.GetRequiredService<IAspireStore>(); 65serviceProvider: app.Services);
Aspire.Hosting.Azure.Kusto.Tests (9)
AzureKustoHealthCheckTests.cs (2)
96await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(kusto.Resource, app.Services), cancellationToken); 99var healthChecks = app.Services.GetRequiredService<HealthCheckService>();
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 (821)
AzureApiManagementTests.cs (9)
1173var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1176Services = app.Services, 1887var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1996var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2032var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2066var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2118var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2178var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2226var model = app.Services.GetRequiredService<DistributedApplicationModel>();
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)
66var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 113var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 142var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 182var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 259var reporter = app.Services.GetRequiredService<IPipelineActivityReporter>() as TestPipelineActivityReporter; 295var reporter = app.Services.GetRequiredService<IPipelineActivityReporter>() as TestPipelineActivityReporter; 329var reporter = app.Services.GetRequiredService<IPipelineActivityReporter>() as TestPipelineActivityReporter; 363var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 400var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 481var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 519var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 556var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 597var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 857var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 879var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 910var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 946var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 982var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1020var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1055var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1131var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1162var 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>(); 1464var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1507var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1527app.Services.GetRequiredService<DistributedApplicationModel>(), 1529app.Services,
AzureBicepProvisionerTests.cs (1)
81var provisioner = app.Services.GetRequiredService<IBicepProvisioner>();
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 (9)
277var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 306var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 349var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 375var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 401var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 421var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 447var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 604var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 630var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureContainerAppExpressEndpointTests.cs (2)
401app.Services.GetRequiredService<DistributedApplicationModel>(), builder.ExecutionContext, 402app.Services, NullLogger.Instance, TestContext.Current.CancellationToken);
AzureContainerAppsTests.cs (74)
60var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 94var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 126var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 252var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 284var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 328var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 358var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 434var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 467var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 540var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 581var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 611var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 647var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 683var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 721var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 761var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 793var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 827var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 864var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 915var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 997var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1046var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1077var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1109var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1140var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1179var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1225var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1268var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1343var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1363var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1384var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1407var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1438var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1474var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1505var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1532var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1563var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1605var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1632var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1689var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1742var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1812var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1834var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1864var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1910var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2062var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2116var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2215var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2245var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2274var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2427var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2478var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2502var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2541var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2582var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2622var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2652var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2690var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2730var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2770var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2815var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2845var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2925var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2951var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2977var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3018var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3076var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3127var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3160var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3202var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3245var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3294var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3329app.Services.GetRequiredService<DistributedApplicationModel>(), 3331app.Services,
AzureContainerRegistryTests.cs (5)
27var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 55var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 88var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 160var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 198var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureCosmosDBEmulatorFunctionalTests.cs (3)
175var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 223var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 293var rns = app.Services.GetRequiredService<ResourceNotificationService>();
AzureCosmosDBExtensionsTests.cs (14)
207var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 318var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 355var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 815var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 817var beforeStartEvent = new BeforeStartEvent(app.Services, model); 847var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 849var beforeStartEvent = new BeforeStartEvent(app.Services, model); 876var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 878var beforeStartEvent = new BeforeStartEvent(app.Services, model); 906var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 908var beforeStartEvent = new BeforeStartEvent(app.Services, model); 1152() => builder.Eventing.PublishAsync(new ResourceReadyEvent(cosmos.Resource, app.Services))); 1169await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(cosmos.Resource, app.Services)); 1243var healthCheckService = app.Services.GetRequiredService<HealthCheckService>();
AzureDeployerTests.cs (16)
102var environment = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<AzureEnvironmentResource>()); 105var runtime = Assert.IsType<FakeContainerRuntime>(app.Services.GetRequiredService<IContainerRuntime>()); 200var runtime = Assert.IsType<FakeContainerRuntime>(app.Services.GetRequiredService<IContainerRuntime>()); 373var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 431var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 494var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 557var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 623var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 918var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 1153var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 1212var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 1439var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 1904var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 1995var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 2028var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 2092var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>();
AzureEnvironmentResourceExtensionsTests.cs (423)
74var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 99var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 110Services = app.Services, 156var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 158app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 159app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 173Services = app.Services, 182Services = app.Services, 209var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 211app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 212app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 230var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 231var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 266var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 268app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 269app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 283await LoadInputAsync(app.Services, inputs, suffix); 299var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 307Services = app.Services, 480var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 488await LoadInputAsync(app.Services, inputs, tenantInput); 498await LoadInputAsync(app.Services, inputs, subscriptionInput); 507await LoadInputAsync(app.Services, inputs, resourceGroupInput); 516await LoadInputAsync(app.Services, inputs, locationInput); 537var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 543await LoadInputAsync(app.Services, inputs, tenantInput); 552await LoadInputAsync(app.Services, inputs, subscriptionInput); 562await LoadInputAsync(app.Services, inputs, resourceGroupInput); 581var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 592await LoadInputAsync(app.Services, inputs, locationInput); 611var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 612var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 655Services = app.Services, 703var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 709Services = app.Services, 744var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 745var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 787var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 788var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 789var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 811var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 812var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 813var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 857var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 858var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 859var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 899var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 900var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 901var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 943var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 945var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 958Services = app.Services, 997var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 998var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 1000app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1001app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1002await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1020Services = app.Services, 1055var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 1056var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1075var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1076var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 1078var (steps, pipelineContext) = await CreateAzureEnvironmentPipelineStepsAsync(environmentResource, model, app.Services); 1096var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 1100app.Services.GetRequiredService<ResourceLoggerService>(), 1102app.Services)); 1135var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1136var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 1164var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1165var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 1186var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1187var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 1207var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1209app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1210app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1212await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1256var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1257var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 1259app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1260app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1262await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1291var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1292var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 1294app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1295app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1297await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1307Services = app.Services, 1339var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1341app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1342app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1344await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1388Services = app.Services, 1451var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1453app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1454app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1456await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1472Services = app.Services, 1726var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1728app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1729app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1731await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1741Services = app.Services, 1784var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1786app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1787app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1789await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1805Services = app.Services, 1845var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1847app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1848app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1850await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1866Services = app.Services, 1906var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1907var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 1909app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1910app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1912await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1927Services = app.Services, 1961var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1962var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 1964app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1965app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1966var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 1968await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2033var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2034var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2036app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2037app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2038var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 2040await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2062Services = app.Services, 2095var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2097app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2098app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2099var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 2101await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2120Services = app.Services, 2154var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2156app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2157app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2158var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 2160await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2171Services = app.Services, 2183Services = app.Services, 2210var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2211var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2213app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2214app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2216await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2248var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2249var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2251app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2252app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2254await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2267Services = app.Services, 2315var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2316var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2318app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2319app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2321await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2351Services = app.Services, 2418var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2419var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2421app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2422app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2424await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2445Services = app.Services, 2489var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2490var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2492app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2493app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2496await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2516Services = app.Services, 2569var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2570var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2572app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2573app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2575await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2594Services = app.Services, 2608Services = app.Services, 2636var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2637var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2639app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2640app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2642await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2673Services = app.Services, 2714var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2715var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2717app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2718app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2720await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2737Services = app.Services, 2774var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2775var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2777app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2778app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2781await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2791Services = app.Services, 2835var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2836var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2838app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2839app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2842await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2851Services = app.Services, 2890var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2891var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 2916var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2918app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2919app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2921await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2928Services = app.Services, 2942Services = app.Services, 2992var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2993var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2995app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2996app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2998await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3005Services = app.Services, 3022Services = app.Services, 3081var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3082var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3084app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3085app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3087await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3089var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 3104Services = app.Services, 3139var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3141app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3142app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3144await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3150Services = app.Services, 3191var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3193app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3194app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3196await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3203Services = app.Services, 3217Services = app.Services, 3253var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3254var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3256app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3257app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3260await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3270Services = app.Services, 3328var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3329var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3331app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3332app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3334await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3343Services = app.Services, 3383var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3384var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3386app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3387app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3389await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3396Services = app.Services, 3443var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3444var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3446app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3447app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3449await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3456Services = app.Services, 3487var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3488var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3490app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3491app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3493await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3511await LoadInputAsync(app.Services, commandInputs, commandLocationInput); 3517Services = app.Services, 3559var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3560var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3562app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3563app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3565await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3587Services = app.Services, 3626var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3627var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3629app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3630app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3632await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3648Services = app.Services, 3685var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3686var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3688app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3689app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3691await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3717Services = app.Services, 3751var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3752var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3754app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3755app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3757await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3774Services = app.Services, 3815var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3816var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3818app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3819app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3821await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3837Services = app.Services, 3880var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3881var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3883app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3884app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3886await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3908Services = app.Services, 3937var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3938var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3963Services = app.Services, 3995var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3996var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4003Services = app.Services, 4062var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4063var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4077Services = app.Services, 4112var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4125Services = app.Services, 4157var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4158var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4181Services = app.Services, 4212var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4214app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4215app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4217await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4219var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 4253var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4255app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4256app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4258await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4260var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 4299var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4300var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4302app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4303app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4305await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4328Services = app.Services, 4357var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4359app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4360app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4362await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4372var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 4393var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4394var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4396app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4397app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4399await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4407Services = app.Services, 4461var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4462var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4464app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4465app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4467await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4479Services = app.Services, 4541var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4542var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4544app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4545app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4547await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4559Services = app.Services, 4620var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4621var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4623app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4624app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4626await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4633Services = app.Services, 4671var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4672var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4674app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4675app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4677await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4685Services = app.Services, 4718var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4719var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4721app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4722app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4724await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4731Services = app.Services, 4764var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4765var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4767app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4768app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4770await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4777Services = app.Services, 4832var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4834app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4835app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4837await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4845Services = app.Services, 4868var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4869var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4871var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 4917var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4918var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4920var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 4965var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4966var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4968var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 5025var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5026var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 5028var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 5066var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5084Services = app.Services, 5125var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5136Services = app.Services, 5166var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5183Services = app.Services, 5213var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5215var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 5231Services = app.Services, 5268var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5269var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 5270var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 5317var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5318var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 5319var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 5359var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5360var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 5362app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 5363app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 5364var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 5366await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 5383Services = app.Services, 5421var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5422var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 5423var controller = app.Services.GetRequiredService<AzureProvisioningController>();
AzureEnvironmentResourceTests.cs (7)
383var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 407var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 438var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 474var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 501var provisioningOptions = app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value; 502var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger<AzurePublishingContext>(); 505return new AzurePublishingContext(outputPath, provisioningOptions, app.Services, logger, step);
AzureEventHubsExtensionsTests.cs (4)
290var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 352var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, Services = app.Services }, CancellationToken.None); 409var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, Services = app.Services }, CancellationToken.None); 479var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, Services = app.Services }, CancellationToken.None);
AzureFunctionsTests.cs (8)
168var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 191var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 634var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 667var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 695var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 724var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 755var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1075var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureKeyVaultTests.cs (1)
39var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureKustoExtensionsTests.cs (1)
31var 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)
38var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 74var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 107var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureRedisExtensionsTests.cs (2)
39var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 59var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureResourcePreparerTests.cs (23)
41var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 80var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 81await app.Services.GetRequiredService<AzureResourcePreparer>().PrepareResourcesAsync(model, default); 91await app.Services.GetRequiredService<AzureResourcePreparer>().PrepareResourcesAsync(model, default); 114var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 115var preparer = app.Services.GetRequiredService<AzureResourcePreparer>(); 193var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 241var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 287var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 342var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 407app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<AzureRoleAssignmentResource>(), 429var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 497var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 518var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 630var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 665var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 730var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 786var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 889var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 891app.Services.GetRequiredService<DistributedApplicationModel>(), 892app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 893app.Services, 894app.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 (87)
45var manager = app.Services.GetRequiredService<IDeploymentStateManager>(); 56var context = new ValueProviderContext { ExecutionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>() }; 94app.Services.GetRequiredService<DistributedApplicationModel>(), 95app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 96app.Services, 141app.Services.GetRequiredService<DistributedApplicationModel>(), 142app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 143app.Services, 193var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 231var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 372var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 394var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 448var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 509var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1079app.Services.GetRequiredService<DistributedApplicationModel>(), 1080app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1081app.Services, 1111app.Services.GetRequiredService<DistributedApplicationModel>(), 1112app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1113app.Services, 1149app.Services.GetRequiredService<DistributedApplicationModel>(), 1150app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1151app.Services, 1218app.Services.GetRequiredService<DistributedApplicationModel>(), 1219app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1220app.Services, 1265app.Services.GetRequiredService<DistributedApplicationModel>(), 1266app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1267app.Services, 2064var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2230var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2292var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2331var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2355var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2396var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2414app.Services, 2430app.Services, 2492Services = app.Services, 2530Services = app.Services, 2556var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2580var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2643var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2700var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2715app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 2716app.Services, 2745app.Services.GetRequiredService<DistributedApplicationModel>().GetProjectResources(), 2771app.Services.GetRequiredService<DistributedApplicationModel>().GetProjectResources(), 2825var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2838app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 2839app.Services, 2848var stateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 2911var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2949Services = app.Services, 2951Model = app.Services.GetRequiredService<DistributedApplicationModel>() 2981var stateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 2996app.Services.GetRequiredService<DistributedApplicationModel>(), 2997app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 2998app.Services, 3031app.Services.GetRequiredService<DistributedApplicationModel>(), 3032app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 3033app.Services, 3068app.Services.GetRequiredService<DistributedApplicationModel>(), 3069app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 3070app.Services, 3106var executionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>(); 3114Services = app.Services, 3116Model = app.Services.GetRequiredService<DistributedApplicationModel>() 3150Services = app.Services, 3152Model = app.Services.GetRequiredService<DistributedApplicationModel>() 3186var executionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>(); 3198Services = app.Services, 3200Model = app.Services.GetRequiredService<DistributedApplicationModel>() 3223app.Services.GetRequiredService<DistributedApplicationModel>(), 3224app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 3225app.Services, 3267var stateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 3278app.Services.GetRequiredService<DistributedApplicationModel>(), 3279app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 3280app.Services, 3311app.Services.GetRequiredService<DistributedApplicationModel>(), 3312app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 3313app.Services, 3375app.Services.GetRequiredService<DistributedApplicationModel>(), 3377app.Services, 3412app.Services.GetRequiredService<DistributedApplicationModel>(), 3413app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 3414app.Services,
AzureSearchExtensionsTests.cs (1)
40var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureServiceBusExtensionsTests.cs (6)
138var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 370var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, Services = app.Services }, CancellationToken.None); 465var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, Services = app.Services }, CancellationToken.None); 517var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, Services = app.Services }, CancellationToken.None); 573var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, Services = app.Services }, CancellationToken.None); 1091var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureSignalRExtensionsTests.cs (2)
21var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 43var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureStorageEmulatorFunctionalTests.cs (6)
48var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 93var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 136var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 190var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 223var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 263var rns = app.Services.GetRequiredService<ResourceNotificationService>();
AzureStorageExtensionsTests.cs (1)
651var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureUserAssignedIdentityTests.cs (10)
30var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 49var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 70var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 112var identity = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<AzureUserAssignedIdentityResource>()); 131var resource = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<AzureUserAssignedIdentityResource>()); 147Assert.Empty(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<AzureUserAssignedIdentityResource>()); 167var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 204var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 262var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 341var 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)
335var 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>();
DurableTaskResourceExtensionsTests.cs (2)
62await builder.Eventing.PublishAsync(new ResourceReadyEvent(taskHub.Resource, app.Services)); 80await builder.Eventing.PublishAsync(new ResourceReadyEvent(taskHub.Resource, app.Services));
ExistingAzureResourceTests.cs (2)
76var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 561var model = app.Services.GetRequiredService<DistributedApplicationModel>();
FoundryExtensionsTests.cs (14)
97var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 98Assert.Contains(app.Services.GetServices<global::Microsoft.Extensions.Hosting.IHostedService>(), service => service is FoundryLocalLifecycleService); 122await builder.Eventing.PublishAsync(new ResourceReadyEvent(foundry.Resource, app.Services), cancellation.Token); 398.PublishAsync(new ResourceReadyEvent(foundry.Resource, app.Services), cancellation.Token) 615var httpClientFactory = app.Services.GetRequiredService<IHttpClientFactory>(); 711var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 757var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 777var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 795var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 839var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 870var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 907var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 947var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 986var model = app.Services.GetRequiredService<DistributedApplicationModel>();
JavaScriptPublishValidationTests.cs (4)
49await app.Services.GetRequiredService<IDistributedApplicationPipeline>().ExecuteAsync( 51app.Services.GetRequiredService<DistributedApplicationModel>(), 52app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 53app.Services,
OutputDiffingOrderingTests.cs (4)
35await app.Services.GetRequiredService<IDistributedApplicationPipeline>().ExecuteAsync( 36new PipelineContext(app.Services.GetRequiredService<DistributedApplicationModel>(), 37app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), app.Services,
RoleAssignmentTests.cs (5)
237var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 266var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 296var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 324var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 348var 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)
114await AssertGatewayProcessLaunchPlanAsync(gateway.Resource, builder, app.Services); 270var imageBuilder = publishApp.Services.GetRequiredService<IResourceContainerImageManager>(); 271var runtime = await publishApp.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(TestContext.Current.CancellationToken);
AddDotnetProjectBlazorGatewayTests.cs (1)
69await AddBlazorGatewayTests.AssertGatewayProcessLaunchPlanAsync(gateway.Resource, builder, app.Services);
BlazorHostedExtensionsTests.cs (2)
596var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 597await 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 (16)
DevTunnelMonitorTests.cs (7)
92test.App.Services.GetRequiredService<ResourceLoggerService>().GetLogger(test.Tunnel) 113test.App.Services.GetRequiredService<IDistributedApplicationEventing>().Subscribe<ResourceEndpointsAllocatedEvent>(test.Port, async (_, ct) => 277test.App.Services.GetRequiredService<IDistributedApplicationEventing>() 316test.App.Services.GetRequiredService<IDistributedApplicationEventing>().Subscribe<ResourceEndpointsAllocatedEvent>(test.Port, 756test.App.Services.GetRequiredService<IDistributedApplicationEventing>().Subscribe<ResourceEndpointsAllocatedEvent>(test.Port, async (_, ct) => 777test.App.Services.GetRequiredService<IDistributedApplicationEventing>().Subscribe<ResourceEndpointsAllocatedEvent>(test.Port, (_, _) => 854var probe = test.App.Services.GetRequiredService<DisposalProbe>();
DevTunnelResourceBuilderExtensionsTests.cs (7)
236await builder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnel.Resource, app.Services)).DefaultTimeout(); 278await builder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnel.Resource, app.Services)).DefaultTimeout(); 316var monitor = app.Services.GetRequiredKeyedService<DevTunnelMonitor>(tunnel.Resource); 380var monitor = app.Services.GetRequiredKeyedService<DevTunnelMonitor>(tunnel.Resource); 858var monitor = app.Services.GetRequiredKeyedService<DevTunnelMonitor>(tunnel.Resource); 884var monitor = app.Services.GetRequiredKeyedService<DevTunnelMonitor>(tunnel.Resource); 890var notifications = app.Services.GetRequiredService<ResourceNotificationService>();
TestDevTunnelMonitor.cs (2)
39Monitor = App.Services.GetRequiredKeyedService<DevTunnelMonitor>(Tunnel); 100await using var reader = App.Services.GetRequiredService<ResourceLoggerService>().WatchAsync(resource ?? Tunnel).GetAsyncEnumerator();
Aspire.Hosting.Docker.Tests (7)
DockerComposePublisherTests.cs (1)
417var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder;
DockerComposeTests.cs (2)
890var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 943var model = app.Services.GetRequiredService<DistributedApplicationModel>();
OutputDiffingOrderingTests.cs (4)
35await app.Services.GetRequiredService<IDistributedApplicationPipeline>().ExecuteAsync( 36new PipelineContext(app.Services.GetRequiredService<DistributedApplicationModel>(), 37app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), app.Services,
Aspire.Hosting.Dotnet.Tests (207)
DotnetCliToolTests.cs (2)
202new RequiredCommandValidationContext("dotnet", app.Services, TestContext.Current.CancellationToken)); 215var provider = app.Services.GetRequiredService<DotnetCliToolSdkVersionProvider>();
DotnetProjectBuildCoordinatorTests.cs (152)
90new BeforeResourceStartedEvent(buildResource, app.Services), 92var args = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 128new BeforeResourceStartedEvent(buildResource, app.Services), 130var args = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 169app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 172new BeforeResourceStartedEvent(buildResource, app.Services), 174var firstArgs = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 189new BeforeResourceStartedEvent(buildResource, app.Services), 191var secondArgs = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 234new BeforeResourceStartedEvent(buildResource, app.Services), 238app.Services); 253new BeforeResourceStartedEvent(rebuilder, app.Services), 257app.Services); 318new BeforeResourceStartedEvent(buildResource, app.Services), 320var buildArguments = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 323serviceProvider: app.Services); 463var fileArgs = await ArgumentEvaluator.GetArgumentListAsync(fileApp.Resource, app.Services); 666var launchArgs = await ArgumentEvaluator.GetArgumentListAsync(file.Resource, app.Services); 668var rebuildArgs = await ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services); 727new BeforeResourceStartedEvent(buildResource, app.Services), 729var buildArgs = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 747new BeforeResourceStartedEvent(rebuilder, app.Services), 749var rebuildArgs = await ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services); 759var fileArgs = await ArgumentEvaluator.GetArgumentListAsync(file.Resource, app.Services); 783app.Services.GetRequiredService<DistributedApplicationOptions>().GlobalArtifactsPath = 791new BeforeResourceStartedEvent(rebuilder, app.Services), 793var rebuildArgs = await ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services); 892app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 895new BeforeResourceStartedEvent(projectBuild, app.Services), 898new BeforeResourceStartedEvent(fileBuild, app.Services), 900var projectBuildArgs = await ArgumentEvaluator.GetArgumentListAsync(projectBuild, app.Services); 904var fileBuildArgs = await ArgumentEvaluator.GetArgumentListAsync(fileBuild, app.Services); 909var fileArgs = await ArgumentEvaluator.GetArgumentListAsync(file.Resource, app.Services); 972var args = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1510serviceProvider: app.Services); 1552new BeforeResourceStartedEvent(buildResource, app.Services), 1558app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1569var rebuildConfiguration = await EvaluateEnvironmentAsync(rebuilder, app.Services, TestContext.Current.CancellationToken); 1577var runtimeEnvironment = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, serviceProvider: app.Services); 1588await ArgumentEvaluator.GetArgumentListAsync(project.Resource, app.Services); 1599app.Services.GetRequiredService<DistributedApplicationOptions>(), 1795serviceProvider: app.Services)); 1838new BeforeResourceStartedEvent(dependent, app.Services), 1853app.Services.GetFakeLogCollector().GetSnapshot(), 1887new BeforeResourceStartedEvent(project.Resource, app.Services), 1927new BeforeResourceStartedEvent(project.Resource, app.Services), 1952new BeforeResourceStartedEvent(buildResource, app.Services), 1964new ResourceStoppedEvent(buildResource, app.Services, stoppedEvent), 1966var logCollector = app.Services.GetFakeLogCollector(); 1976new BeforeResourceStartedEvent(project.Resource, app.Services), 2002new BeforeResourceStartedEvent(buildResource, app.Services), 2022new BeforeResourceStartedEvent(buildResource, app.Services), 2025new ResourceStoppedEvent(buildResource, app.Services, firstStoppedEvent), 2037new ResourceStoppedEvent(buildResource, app.Services, secondStoppedEvent), 2042new BeforeResourceStartedEvent(project.Resource, app.Services), 2046app.Services.GetFakeLogCollector().GetSnapshot(), 2117var loggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 2122new BeforeResourceStartedEvent(buildResource, app.Services), 2140await completion.Callback(app.Services, TestContext.Current.CancellationToken); 2181new BeforeResourceStartedEvent(target, app.Services), 2183var wait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 2194completion.Callback(app.Services, TestContext.Current.CancellationToken)); 2201Assert.Equal(2, app.Services.GetFakeLogCollector().GetSnapshot().Count( 2225app.Services.GetRequiredService<ResourceLoggerService>().SetConsoleLogsService( 2239var canceledWait = completion.Callback(app.Services, canceled.Token); 2241var firstWait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 2242var secondWait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 2254Assert.Single(app.Services.GetFakeLogCollector().GetSnapshot(), 2283app.Services.GetRequiredService<ResourceLoggerService>().SetConsoleLogsService( 2295var firstWait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 2301new BeforeResourceStartedEvent(buildResource, app.Services), 2308completion.Callback(app.Services, TestContext.Current.CancellationToken)); 2315Assert.Equal(2, app.Services.GetFakeLogCollector().GetSnapshot().Count( 2359completion.Callback(app.Services, completionCts.Token)); 2362var loggers = app.Services.GetRequiredService<ResourceLoggerService>(); 2366Assert.Single(app.Services.GetFakeLogCollector().GetSnapshot(), 2387app.Services.GetRequiredService<ResourceLoggerService>().SetConsoleLogsService( 2399new BeforeResourceStartedEvent(project.Resource, app.Services), 2410app.Services.GetRequiredService<ResourceLoggerService>().SetConsoleLogsService( 2443serviceProvider: app.Services); 2450serviceProvider: app.Services)); 2453serviceProvider: app.Services); 2486serviceProvider: app.Services); 2489serviceProvider: app.Services); 2523new BeforeResourceStartedEvent(buildResource, app.Services), 2527serviceProvider: app.Services); 2528await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, serviceProvider: app.Services); 2540new BeforeResourceStartedEvent(buildResource, app.Services), 2544serviceProvider: app.Services); 2550serviceProvider: app.Services); 2619serviceProvider: app.Services); 2642serviceProvider: app.Services)); 2692await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(buildResource, serviceProvider: app.Services)); 2699serviceProvider: app.Services); 2752new BeforeResourceStartedEvent(buildResource, app.Services), 2756serviceProvider: app.Services); 2770serviceProvider: app.Services); 2774serviceProvider: app.Services); 2800new BeforeResourceStartedEvent(rebuilder, app.Services), 2805serviceProvider: app.Services).AsTask(); 2807var refreshedArgumentsTask = ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services).AsTask(); 2810serviceProvider: app.Services).AsTask(); 2818var projectArguments = await ArgumentEvaluator.GetArgumentListAsync(project.Resource, app.Services); 2869new BeforeResourceStartedEvent(buildResource, app.Services), 2873serviceProvider: app.Services).AsTask(); 2879new BeforeResourceStartedEvent(rebuilder, app.Services), 2885var firstArguments = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 2899serviceProvider: app.Services); 2900var secondArguments = await ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services); 2945app.Services, 2950app.Services, 3005new BeforeResourceStartedEvent(buildResource, app.Services), 3011app.Services, 3028new BeforeResourceStartedEvent(rebuilder, app.Services), 3032app.Services, 3060app.Services, 3063app.Services.GetRequiredService<IHostApplicationLifetime>().StopApplication(); 3093serviceProvider: app.Services); 3096serviceProvider: app.Services); 3099serviceProvider: app.Services); 3156var arguments = await ArgumentEvaluator.GetArgumentListAsync(project.Resource, app.Services); 3200var firstArguments = await ArgumentEvaluator.GetArgumentListAsync(project.Resource, app.Services); 3209var secondArguments = await ArgumentEvaluator.GetArgumentListAsync(project.Resource, app.Services); 3490var args = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 3522var args = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 3552serviceProvider: app.Services); 3585serviceProvider: app.Services); 3618serviceProvider: app.Services); 4040var executables = await app.Services.GetRequiredService<IKubernetesService>() 4252var args = await ArgumentEvaluator.GetArgumentListAsync(missing.Resource, app.Services); 4316Assert.Equal(["exec", expectedTargetPath], await ArgumentEvaluator.GetArgumentListAsync(project.Resource, app.Services)); 4415Services = app.Services, 4456var wait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 4484var coordinator = app.Services.GetRequiredService<DotnetProjectBuildCoordinator.CoordinatorState>(); 4485var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4565var wait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 4579var retry = completion.Callback(app.Services, TestContext.Current.CancellationToken); 4606var canceledWait = completion.Callback(app.Services, canceled.Token); 4607var otherWait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 4623await completion.Callback(app.Services, TestContext.Current.CancellationToken); 4648await completion.Callback(app.Services, TestContext.Current.CancellationToken); 4657var wait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 4691var wait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 4697var retry = completion.Callback(app.Services, TestContext.Current.CancellationToken); 4724var coordinator = app.Services.GetRequiredService<DotnetProjectBuildCoordinator.CoordinatorState>(); 4752app.Services, 4866app.Services.GetRequiredService<ResourceLoggerService>(), 4925var orchestrator = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 5400var coordinator = app.Services.GetRequiredService<DotnetProjectBuildCoordinator.CoordinatorState>(); 5401var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5403new BeforeStartEvent(app.Services, model), 5405await coordinator.MaterializeBuildPlan(model, app.Services);
DotnetProjectPathTests.cs (3)
140new BeforeResourceStartedEvent(resource.Resource, app.Services), 172new BeforeResourceStartedEvent(resource.Resource, app.Services), 296new BeforeResourceStartedEvent(resource.Resource, app.Services),
DotnetProjectResourceTests.cs (30)
104var rendered = app.Services.GetRequiredService<ExecutableCreator>() 137app.Services.GetRequiredService<ExecutableCreator>().PrepareObjects(TestContext.Current.CancellationToken).ToArray()); 329var runtime = await app.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(cancellation.Token); 330var logger = app.Services.GetRequiredService<ILogger<DotnetProjectResourceTests>>(); 349var processRunner = app.Services.GetRequiredService<IProcessRunner>(); 357var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 411var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 513new BeforeResourceStartedEvent(rebuilder, app.Services), 515var args = await ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services); 715var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 777var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 803var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 829var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 848var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 883var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 907var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 939var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 971var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 1001var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 1044var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 1072var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 1113var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1115app.Services.GetRequiredService<DistributedApplicationModel>(), 1116app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1117app.Services, 1118app.Services.GetRequiredService<ILogger<DotnetProjectResourceTests>>(), 1172var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1183var runtime = await app.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(cancellation.Token); 1184var processRunner = app.Services.GetRequiredService<IProcessRunner>(); 1185var logger = app.Services.GetRequiredService<ILogger<DotnetProjectResourceTests>>();
MsTestCollectorTests.cs (1)
285var coordinator = app.Services.GetRequiredService<TestRunCoordinator>();
MsTestResourceTests.cs (15)
63await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, 64app.Services.GetRequiredService<DistributedApplicationModel>()), TestContext.Current.CancellationToken); 65var arguments = await ArgumentEvaluator.GetArgumentListAsync(resource.Resource, app.Services); 84var environment = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource.Resource, serviceProvider: app.Services); 110await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, 111app.Services.GetRequiredService<DistributedApplicationModel>()), TestContext.Current.CancellationToken); 112await Assert.ThrowsAsync<ArgumentException>(async () => await ArgumentEvaluator.GetArgumentListAsync(resource.Resource, app.Services)); 116app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()), TestContext.Current.CancellationToken)); 132await builder.Eventing.PublishAsync(new BeforeResourceStartedEvent(resource.Resource, app.Services), 135new BeforeResourceStartedEvent(resource.Resource, app.Services), TestContext.Current.CancellationToken)); 155await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, 156app.Services.GetRequiredService<DistributedApplicationModel>()), TestContext.Current.CancellationToken); 160var args = await ArgumentEvaluator.GetArgumentListAsync(resource.Resource, app.Services); 183var args = await ArgumentEvaluator.GetArgumentListAsync(resource.Resource, app.Services);
WslcDotnetPublishingTests.cs (4)
35var manager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 67var manager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 89var manager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 139var manager = app.Services.GetRequiredService<IResourceContainerImageManager>();
Aspire.Hosting.EntityFrameworkCore.Tests (23)
AddEFMigrationsTests.cs (2)
82var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 294var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
EFBuildCustomizationWarningTests.cs (4)
86migrations.Resource, logger, TestContext.Current.CancellationToken, app.Services, tool.Resource); 129TestContext.Current.CancellationToken, app.Services, tool.Resource); 162TestContext.Current.CancellationToken, app.Services, tool.Resource); 192migrations.Resource, logger, TestContext.Current.CancellationToken, app.Services, tool.Resource);
EFBuildReadinessTests.cs (8)
40var execution = app.Services.GetRequiredService<ResourceCommandService>().ExecuteCommandAsync( 75new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()), token); 109new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()), token); 146var commands = app.Services.GetRequiredService<ResourceCommandService>(); 184migrations.Resource, NullLogger.Instance, TestContext.Current.CancellationToken, app.Services, tool.Resource); 208migrations.Resource, NullLogger.Instance, TestContext.Current.CancellationToken, app.Services, tool.Resource);
EFCoreOperationExecutorTests.cs (2)
150app.Services, 171app.Services,
EFMigrationPipelineTests.cs (2)
53app.Services.GetRequiredService<DistributedApplicationModel>(), builder.ExecutionContext, app.Services,
EFMigrationWaitForTests.cs (1)
105var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
EFOutputDiffingTests.cs (4)
131private static Task ExecuteAsync(DistributedApplication app) => app.Services.GetRequiredService<IDistributedApplicationPipeline>().ExecuteAsync( 132new PipelineContext(app.Services.GetRequiredService<DistributedApplicationModel>(), 133app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), app.Services,
Aspire.Hosting.Foundry.Tests (24)
HostedAgentExtensionTests.cs (10)
151app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 428app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 595app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 622app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 645app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 688app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 718app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 741app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 925var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 927await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
ProjectResourceTests.cs (2)
110var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 132var model = app.Services.GetRequiredService<DistributedApplicationModel>();
PromptAgentTests.cs (3)
802app.Services.GetRequiredService<DistributedApplicationModel>(), 804app.Services, 825var notifications = app.Services.GetRequiredService<ResourceNotificationService>();
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 (7)
AddGarnetTests.cs (7)
23var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 51var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 80var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 102var connectionAvailable = builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(garnet, app.Services), cts.Token); 373var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 394var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 411var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Go.Tests (34)
AddGoAppTests.cs (18)
558var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 596Services = application.Services 694var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 726var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 759var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 1036var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1063var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1125var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1146var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1169var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1189var pipeline = (DistributedApplicationPipeline)app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1218var pipeline = (DistributedApplicationPipeline)app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1616Services = app.Services 1628var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1659app.Services.GetRequiredService<DistributedApplicationModel>(), 1660app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1661app.Services, 1662app.Services.GetRequiredService<ILogger<AddGoAppTests>>(),
GoRunDebuggingTests.cs (16)
114app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 249app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 265await app.Services.GetRequiredService<ResourceNotificationService>().PublishUpdateAsync(go.Resource, snapshot => snapshot with 272app.Services.GetRequiredService<IConfiguration>(), 273app.Services.GetRequiredService<ProfilingTelemetry>(), 274app.Services); 443app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 444var environment = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(go.Resource, serviceProvider: app.Services); 445var arguments = await ArgumentEvaluator.GetArgumentListAsync(go.Resource, app.Services); 446var processRunner = app.Services.GetRequiredService<IProcessRunner>(); 490app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 492return await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource, serviceProvider: app.Services);
Aspire.Hosting.Java.Tests (23)
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 (2)
121app.Resource, serviceProvider: built.Services.GetRequiredService<IServiceProvider>()); 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 (89)
AddBunAppTests.cs (3)
151var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 173var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 199var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AddDenoAppTests.cs (11)
1258var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1280var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1307var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1328var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1353var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1381var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1493var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1508var appModel = distributedApplication.Services.GetRequiredService<DistributedApplicationModel>(); 1525var appModel = distributedApplication.Services.GetRequiredService<DistributedApplicationModel>(); 1543var appModel = distributedApplication.Services.GetRequiredService<DistributedApplicationModel>(); 1702var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AddJavaScriptAppTests.cs (9)
218var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 256var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 278var pipeline = (DistributedApplicationPipeline)app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 300var pipeline = (DistributedApplicationPipeline)app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 324var pipeline = (DistributedApplicationPipeline)app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 775app.Services.GetRequiredService<DistributedApplicationModel>(), 776app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 777app.Services, 778app.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>(); 481var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 508var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 525var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 546var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AddViteAppTests.cs (25)
501var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 526var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 557var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 571ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 617var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 631ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 669var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 718var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 729ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 764var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 781ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 827var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 840ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 903var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 913ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 1004var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1018ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 1055var pipeline = (DistributedApplicationPipeline)app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1111var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1126app.Services.GetRequiredService<DistributedApplicationModel>(), 1127app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1128app.Services, 1129app.Services.GetRequiredService<ILogger<AddViteAppTests>>(), 1134var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1139ExecutionContext = 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)
229var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 230await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel));
ResourceCreationTests.cs (9)
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>(); 224var 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 (67)
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)
167var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 247var 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)
35var store = app.Services.GetRequiredService<IAspireStore>(); 42serviceProvider: app.Services); 49serviceProvider: app.Services); 70serviceProvider: app.Services); 73serviceProvider: app.Services); 95serviceProvider: app.Services); 98serviceProvider: app.Services); 188serviceProvider: app.Services); 264serviceProvider: app.Services); 291var store = app.Services.GetRequiredService<IAspireStore>(); 294serviceProvider: app.Services);
KubernetesPublisherTests.cs (6)
1034var steps = await PipelineStepTestHelpers.CreateStepsAsync(app.Services, environment.Resource); 1037var error = await Assert.ThrowsAsync<AggregateException>(() => PipelineStepTestHelpers.RunStepAsync(app.Services, prepare)); 1055var steps = await PipelineStepTestHelpers.CreateStepsAsync(app.Services, environment.Resource); 1058var error = await Assert.ThrowsAsync<InvalidOperationException>(() => PipelineStepTestHelpers.RunStepAsync(app.Services, prepare)); 1064await PipelineStepTestHelpers.RunStepAsync(app.Services, prepare); 3108var store = app.Services.GetRequiredService<IAspireStore>();
OutputDiffingOrderingTests.cs (4)
35await app.Services.GetRequiredService<IDistributedApplicationPipeline>().ExecuteAsync( 36new PipelineContext(app.Services.GetRequiredService<DistributedApplicationModel>(), 37app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), app.Services,
Aspire.Hosting.Maui.Tests (69)
MauiBuildQueueTests.cs (20)
376var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 377var loggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 378var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 379var execContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>(); 384app.Services.GetRequiredService<ResourceCommandService>()); 389new BeforeResourceStartedEvent(android, app.Services), 409var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 410var loggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 411var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 412var execContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>(); 420app.Services.GetRequiredService<ResourceCommandService>()); 427new BeforeResourceStartedEvent(android, app.Services), 1356public IServiceProvider Services => App.Services; 1357public IDistributedApplicationEventing Eventing => App.Services.GetRequiredService<IDistributedApplicationEventing>(); 1358public ResourceNotificationService NotificationService => App.Services.GetRequiredService<ResourceNotificationService>(); 1437var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1438var loggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1439var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 1440var execContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>(); 1442var 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>(); 196var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.MongoDB.Tests (44)
AddMongoDBTests.cs (25)
46var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 74var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 105var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 141await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 171await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 399var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 454var files = callback.Callback(new() { Model = mongo, Services = app.Services }, cts.Token); 498var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 499await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 523var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 524await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 549var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 550await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 570var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 571await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 608var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 609await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 649var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 650await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 669var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 670await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 687var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 688await 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)
130await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()));
tests\Shared\ContainerReplCommandTestBase.cs (4)
56Services = app.Services, 76var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 87Services = app.Services, 110Services = app.Services,
Aspire.Hosting.MySql.Tests (17)
AddMySqlTests.cs (12)
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)); 323await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 324await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 403var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 419var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 424new BeforeResourceStartedEvent(phpMyAdminResource, app.Services),
MySqlFunctionalTests.cs (1)
588var rns = app.Services.GetRequiredService<ResourceNotificationService>();
tests\Shared\ContainerReplCommandTestBase.cs (4)
56Services = app.Services, 76var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 87Services = app.Services, 110Services = 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.OpenAI.Tests (2)
OpenAIExtensionTests.cs (2)
24var loggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 26new InitializeResourceEvent(resource, builder.Eventing, loggerService, notifications, app.Services), cts.Token)).ToArray();
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)
570var 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)
56Services = app.Services, 76var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 87Services = app.Services, 110Services = app.Services,
Aspire.Hosting.Python.Tests (66)
AddPythonAppTests.cs (66)
158var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 197var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 240var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 448var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 481var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 542var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 573var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 609var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 658var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 693var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 736var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 770var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 801var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 821var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 860var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 879var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 902var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 928var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 959var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 984var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1003var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1022var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1043var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1079var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1113var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1145var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1169var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1191var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1217var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1330var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1349var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1460var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1479var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1502var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1521var pipeline = (DistributedApplicationPipeline)app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1550var pipeline = (DistributedApplicationPipeline)app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1574var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1754var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1798var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1838var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 2010var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 2371var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2406var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2460var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2481var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2508var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2536var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2560var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2592var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2635var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2665var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2701var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2737var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2766var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2798var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2828var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2861var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2893var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2918var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2946app.Services.GetRequiredService<DistributedApplicationModel>(), 2947app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 2948app.Services, 2949app.Services.GetRequiredService<ILogger<AddPythonAppTests>>(), 2959var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2960var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 2961await 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>(); 421var 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 (138)
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>(); 113var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 133var model = app.Services.GetRequiredService<DistributedApplicationModel>();
OutputDiffingOrderingTests.cs (4)
35await app.Services.GetRequiredService<IDistributedApplicationPipeline>().ExecuteAsync( 36new PipelineContext(app.Services.GetRequiredService<DistributedApplicationModel>(), 37app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), app.Services,
Publishing\BackingResourceContractTests.cs (1)
228_ = 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>(); 169var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 185var 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 (16)
49var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 55infrastructure.BuildAsync(app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), default)); 75var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 80var options = await infrastructure.BuildAsync(app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), default); 106var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 111var options = await infrastructure.BuildAsync(app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), default); 144var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 168var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 225var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 259var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 299var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 322var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 351var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 378var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 408var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 434var 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)
104var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 134var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 159var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 181var 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)
40var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 68var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 99var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 118var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 135var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 152var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 177var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 206var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 232var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 301var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 302var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 305await eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 327var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 328var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 331await eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 533var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 564await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 590await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 611await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 874var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 900var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 995var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 998var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 1036var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1038await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 1052var args = await ArgumentEvaluator.GetArgumentListAsync(redis.Resource, app.Services).AsTask().WaitAsync(TimeSpan.FromSeconds(60)); 1082var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1085var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 1110var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1113var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
RedisFunctionalTests.cs (5)
293var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 628var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 663var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 782var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 792var clientFactory = app.Services.GetRequiredService<IHttpClientFactory>();
tests\Shared\ContainerReplCommandTestBase.cs (4)
56Services = app.Services, 76var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 87Services = app.Services, 110Services = 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 (16)
AddSqlServerTests.cs (12)
48var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 95var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 117var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 281var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 315var registrations = app.Services.GetRequiredService<IOptions<HealthCheckServiceOptions>>().Value.Registrations; 319Assert.Equal("Connection string is unavailable", Assert.Throws<InvalidOperationException>(() => serverRegistration.Factory(app.Services)).Message); 320Assert.Equal("Connection string is unavailable", Assert.Throws<InvalidOperationException>(() => dbRegistration.Factory(app.Services)).Message); 322await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(sqlServer.Resource, app.Services)); 323await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(db.Resource, app.Services)); 325Assert.IsType<SqlServerHealthCheck>(serverRegistration.Factory(app.Services)); 326Assert.IsType<SqlServerHealthCheck>(dbRegistration.Factory(app.Services)); 353var connectionAvailable = builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(resource, app.Services), cts.Token);
tests\Shared\ContainerReplCommandTestBase.cs (4)
56Services = app.Services, 76var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 87Services = app.Services, 110Services = app.Services,
Aspire.Hosting.Testing (10)
DistributedApplicationFactory.cs (2)
171_shutdownTimeout = application.Services.GetService<IOptions<HostOptions>>()?.Value.ShutdownTimeout ?? _shutdownTimeout; 444_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 (19)
DashboardTestingBuilderTests.cs (5)
105Assert.False(app.Services.GetRequiredService<IInteractionService>().IsAvailable); 108app.Services.GetRequiredService<IOptions<ResourceNotificationServiceOptions>>().Value.DefaultWaitBehavior); 132Assert.True(app.Services.GetRequiredService<IInteractionService>().IsAvailable); 223var dashboardOptions = app.Services.GetRequiredService<IOptions<DashboardOptions>>().Value; 236var dashboardOptions = app.Services.GetRequiredService<IOptions<DashboardOptions>>().Value;
TestingBuilderTests.cs (7)
51Assert.Same(app.Services.GetRequiredService<IFileSystemService>(), fileSystemService); 124var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 201var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 446var hostEnvironment = app.Services.GetRequiredService<IHostEnvironment>(); 462var config = app.Services.GetRequiredService<IConfiguration>(); 624var dashboardServiceHost = app.Services.GetRequiredService<DashboardServiceHost>(); 652var dashboardServiceHost = app.Services.GetRequiredService<DashboardServiceHost>();
TestingFactoryTests.cs (3)
44var appModel = _app.Services.GetRequiredService<DistributedApplicationModel>(); 66var appModel = _app.Services.GetRequiredService<IHostEnvironment>(); 75var 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 (1275)
AddConnectionStringTests.cs (3)
200var redactedValues = app.Services.GetRequiredService<SecretRedactionHistory>().AddValuesAndSnapshot([]); 323var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 352var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AddParameterTests.cs (15)
243Services = app.Services 614var files = callback.Callback(new() { Model = pgadmin, Services = app.Services }, cts.Token); 683var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 799var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 994var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1030var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1063var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1102var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1183var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1252var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1284var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1751var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1775var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1798var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1824var 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 (209)
133var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 145app.Services.GetRequiredService<IConfiguration>(), 146app.Services.GetRequiredService<ProfilingTelemetry>(), 147app.Services); 181var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 251app.Services.GetRequiredService<IConfiguration>(), 252app.Services.GetRequiredService<ProfilingTelemetry>(), 253app.Services); 350var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 364app.Services.GetRequiredService<IConfiguration>(), 365app.Services.GetRequiredService<ProfilingTelemetry>(), 366app.Services); 402var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 411app.Services.GetRequiredService<IConfiguration>(), 412app.Services.GetRequiredService<ProfilingTelemetry>(), 413app.Services); 458var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 466app.Services.GetRequiredService<IConfiguration>(), 467app.Services.GetRequiredService<ProfilingTelemetry>(), 468app.Services); 497await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 499var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 511app.Services.GetRequiredService<IConfiguration>(), 512app.Services.GetRequiredService<ProfilingTelemetry>(), 513app.Services); 546await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 548var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 561app.Services.GetRequiredService<IConfiguration>(), 562app.Services.GetRequiredService<ProfilingTelemetry>(), 563app.Services); 608await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 610var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 624app.Services.GetRequiredService<IConfiguration>(), 625app.Services.GetRequiredService<ProfilingTelemetry>(), 626app.Services); 638await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 684await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 686var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 698app.Services.GetRequiredService<IConfiguration>(), 699app.Services.GetRequiredService<ProfilingTelemetry>(), 700app.Services); 712await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 754await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 756var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 770app.Services.GetRequiredService<IConfiguration>(), 771app.Services.GetRequiredService<ProfilingTelemetry>(), 772app.Services); 825await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 827var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 840app.Services.GetRequiredService<IConfiguration>(), 841app.Services.GetRequiredService<ProfilingTelemetry>(), 842app.Services); 866app.Services.GetRequiredService<IConfiguration>(), 867app.Services.GetRequiredService<ProfilingTelemetry>(), 868app.Services); 914await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 916var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 932app.Services.GetRequiredService<IConfiguration>(), 933app.Services.GetRequiredService<ProfilingTelemetry>(), 934app.Services); 968await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 976var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 989app.Services.GetRequiredService<IConfiguration>(), 990app.Services.GetRequiredService<ProfilingTelemetry>(), 991app.Services); 1024app.Services.GetRequiredService<IConfiguration>(), 1025app.Services.GetRequiredService<ProfilingTelemetry>(), 1026app.Services); 1038var executionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>(); 1072app.Services.GetRequiredService<IConfiguration>(), 1073app.Services.GetRequiredService<ProfilingTelemetry>(), 1074app.Services); 1096var executionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>(); 1127await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 1129var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1141app.Services.GetRequiredService<IConfiguration>(), 1142app.Services.GetRequiredService<ProfilingTelemetry>(), 1143app.Services); 1178await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 1180var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1184app.Services.GetRequiredService<IConfiguration>(), 1185app.Services.GetRequiredService<ProfilingTelemetry>(), 1186app.Services); 1245var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1257app.Services.GetRequiredService<IConfiguration>(), 1258app.Services.GetRequiredService<ProfilingTelemetry>(), 1259app.Services); 1317var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1325app.Services.GetRequiredService<IConfiguration>(), 1326app.Services.GetRequiredService<ProfilingTelemetry>(), 1327app.Services); 1353var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1367app.Services.GetRequiredService<IConfiguration>(), 1368app.Services.GetRequiredService<ProfilingTelemetry>(), 1369app.Services); 1393var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1412app.Services.GetRequiredService<IConfiguration>(), 1413app.Services.GetRequiredService<ProfilingTelemetry>(), 1414app.Services); 1452var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1460app.Services.GetRequiredService<IConfiguration>(), 1461app.Services.GetRequiredService<ProfilingTelemetry>(), 1462app.Services); 1488var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1496app.Services.GetRequiredService<IConfiguration>(), 1497app.Services.GetRequiredService<ProfilingTelemetry>(), 1498app.Services); 1523app.Services.GetRequiredService<IConfiguration>(), 1524app.Services.GetRequiredService<ProfilingTelemetry>(), 1525app.Services); 1527var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1562app.Services.GetRequiredService<IConfiguration>(), 1563app.Services.GetRequiredService<ProfilingTelemetry>(), 1564app.Services); 1566var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1601app.Services.GetRequiredService<IConfiguration>(), 1602app.Services.GetRequiredService<ProfilingTelemetry>(), 1603app.Services); 1636app.Services.GetRequiredService<IConfiguration>(), 1637app.Services.GetRequiredService<ProfilingTelemetry>(), 1638app.Services); 1671app.Services.GetRequiredService<IConfiguration>(), 1672app.Services.GetRequiredService<ProfilingTelemetry>(), 1673app.Services); 1743var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1754app.Services.GetRequiredService<IConfiguration>(), 1755app.Services.GetRequiredService<ProfilingTelemetry>(), 1756app.Services); 1784app.Services.GetRequiredService<IConfiguration>(), 1785app.Services.GetRequiredService<ProfilingTelemetry>(), 1786app.Services); 1810var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1825app.Services.GetRequiredService<IConfiguration>(), 1826app.Services.GetRequiredService<ProfilingTelemetry>(), 1827app.Services); 1855var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1869app.Services.GetRequiredService<IConfiguration>(), 1870app.Services.GetRequiredService<ProfilingTelemetry>(), 1871app.Services); 1901var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1913app.Services.GetRequiredService<IConfiguration>(), 1914app.Services.GetRequiredService<ProfilingTelemetry>(), 1915app.Services); 1943var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1957app.Services.GetRequiredService<IConfiguration>(), 1958app.Services.GetRequiredService<ProfilingTelemetry>(), 1959app.Services); 1990var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 2005app.Services.GetRequiredService<IConfiguration>(), 2006app.Services.GetRequiredService<ProfilingTelemetry>(), 2007app.Services); 2036var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 2041var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 2057app.Services.GetRequiredService<IConfiguration>(), 2058app.Services.GetRequiredService<ProfilingTelemetry>(), 2059app.Services); 2096var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 2115app.Services.GetRequiredService<IConfiguration>(), 2116app.Services.GetRequiredService<ProfilingTelemetry>(), 2117app.Services); 2151var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 2166app.Services.GetRequiredService<IConfiguration>(), 2167app.Services.GetRequiredService<ProfilingTelemetry>(), 2168app.Services); 2199var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 2206app.Services.GetRequiredService<IConfiguration>(), 2207app.Services.GetRequiredService<ProfilingTelemetry>(), 2208app.Services); 2260var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2265var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 2274app.Services.GetRequiredService<IConfiguration>(), 2275app.Services.GetRequiredService<ProfilingTelemetry>(), 2276app.Services); 2385app.Services.GetRequiredService<IConfiguration>(), 2386app.Services.GetRequiredService<ProfilingTelemetry>(), 2387app.Services); 2440app.Services.GetRequiredService<IConfiguration>(), 2441app.Services.GetRequiredService<ProfilingTelemetry>(), 2442app.Services); 2501app.Services.GetRequiredService<IConfiguration>(), 2502app.Services.GetRequiredService<ProfilingTelemetry>(), 2503app.Services); 2570app.Services.GetRequiredService<IConfiguration>(), 2571app.Services.GetRequiredService<ProfilingTelemetry>(), 2572app.Services); 2647app.Services.GetRequiredService<IConfiguration>(), 2648app.Services.GetRequiredService<ProfilingTelemetry>(), 2649app.Services); 2697app.Services.GetRequiredService<IConfiguration>(), 2698app.Services.GetRequiredService<ProfilingTelemetry>(), 2699app.Services); 2752app.Services.GetRequiredService<IConfiguration>(), 2753app.Services.GetRequiredService<ProfilingTelemetry>(), 2754app.Services); 2784app.Services.GetRequiredService<IConfiguration>(), 2785app.Services.GetRequiredService<ProfilingTelemetry>(), 2786app.Services); 2811app.Services.GetRequiredService<IConfiguration>(), 2812app.Services.GetRequiredService<ProfilingTelemetry>(), 2813app.Services); 2840app.Services.GetRequiredService<IConfiguration>(), 2841app.Services.GetRequiredService<ProfilingTelemetry>(), 2842app.Services); 2861app.Services.GetRequiredService<IConfiguration>(), 2862app.Services.GetRequiredService<ProfilingTelemetry>(), 2863app.Services); 2894app.Services.GetRequiredService<IConfiguration>(), 2895app.Services.GetRequiredService<ProfilingTelemetry>(), 2896app.Services);
Backchannel\AuxiliaryBackchannelTests.cs (27)
41var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 81var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 133var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 148var logs = app.Services.GetFakeLogCollector().GetSnapshot() 166var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 201var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 242var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 286var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 330var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 366var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 407var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 444var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 464var lifetime = app.Services.GetService<IHostApplicationLifetime>(); 491var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 509var lifetime = app.Services.GetRequiredService<IHostApplicationLifetime>(); 551var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 572var lifetime = app.Services.GetRequiredService<IHostApplicationLifetime>(); 602app.Services.GetRequiredService<IConfiguration>(), 603app.Services.GetRequiredService<ProfilingTelemetry>(), 604app.Services) 616var lifetime = app.Services.GetRequiredService<IHostApplicationLifetime>(); 644var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 682var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 725var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 768var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 812var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 835var 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>>(),
Cli\TestingCollectorTests.cs (3)
102await ReadAsync(app.Services.GetRequiredService<TestRunCoordinator>(), events).DefaultTimeout(); 131app.Services.GetRequiredService<TestRunCoordinator>().WaitForCompletionAsync(TestContext.Current.CancellationToken)); 157Assert.False(await app.Services.GetRequiredService<TestRunCoordinator>()
Cli\TestRunCoordinatorEndToEndTests.cs (2)
95var lifetime = app.Services.GetRequiredService<IHostApplicationLifetime>(); 167Assert.False(app.Services.GetRequiredService<IHostApplicationLifetime>().ApplicationStopping.IsCancellationRequested);
Codespaces\CodespacesUrlRewriterTests.cs (1)
57var collector = app.Services.GetFakeLogCollector();
ConditionalReferenceExpressionTests.cs (6)
118var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()); 138app.Services.GetRequiredService<DistributedApplicationModel>(), workspace.Path).DefaultTimeout(); 157app.Services.GetRequiredService<DistributedApplicationModel>(), workspace.Path); 174app.Services.GetRequiredService<DistributedApplicationModel>())); 192var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()); 213var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>());
ContainerRegistryResourceTests.cs (29)
147var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 162var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 178var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 194var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 298var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 428var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 431var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 552var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 558var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 576var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 579var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 600var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 603var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 622var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 625var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 645var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 648var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 681var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 684var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 705var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 708var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 732var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 738var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 756var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 759var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 776var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 779var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 797var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 800var 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>(); 799var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 844var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 859app.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 (285)
76app.Services.GetRequiredService<DcpHost>().MsBuildNodeReuseIsolation, 77app.Services.GetRequiredService<MsBuildNodeReuseIsolation>()); 81Assert.Null(app.Services.GetService<MsBuildNodeReuseIsolation>()); 83var earlyEnvironment = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(build, serviceProvider: app.Services); 87app.Services.GetRequiredService<DistributedApplicationModel>(), 123app.Services.GetRequiredService<DistributedApplicationModel>(), 213app.Services.GetRequiredService<DistributedApplicationModel>(), 305app.Services.GetRequiredService<DistributedApplicationModel>(), 363app.Services.GetRequiredService<DistributedApplicationModel>(), 407app.Services.GetRequiredService<DistributedApplicationModel>(), 434await using var executor = CreateAppExecutor(app.Services.GetRequiredService<DistributedApplicationModel>()); 454app.Services.GetRequiredService<DistributedApplicationModel>(), 476var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 499var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 520var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 545var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 567var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 600app.Services.GetRequiredService<DistributedApplicationModel>(), 629var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 713var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 755var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 818var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 864var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 899var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 940var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 987app.Services.GetRequiredService<DistributedApplicationModel>(), 1008var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1030var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1052var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1076var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1110var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1180var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1218var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1249var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1289var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1314var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1351var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1369var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1398var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1433var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1476var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1514var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1542var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1573var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1605var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1635var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1675var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1718var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1755var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1801var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1842var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1874var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1913var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1939var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1977var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2032var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2089var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2135var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2188var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2240var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2287var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2332var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2380var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2433var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2475var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2532var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2554var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2590var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2694var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2766var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2859var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2922var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3012var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3113var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3193var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3278var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3373var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3529var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3661app.Services.GetRequiredService<DistributedApplicationModel>(), 3729app.Services.GetRequiredService<DistributedApplicationModel>(), 3764var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3817var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3873var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3967var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4091var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4161var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4240var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4359var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4421var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4486var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4578var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4625var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4668var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4705var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4750var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4779var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4814var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4944var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5027var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5045var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5078var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5150var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5151var orchestrator = app.Services.GetRequiredService<Hosting.Orchestrator.ApplicationOrchestrator>(); 5202var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5237var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5284var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5326var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5374_ = app.Services.GetRequiredService<Hosting.Orchestrator.ApplicationOrchestrator>(); 5376app.Services.GetRequiredService<DistributedApplicationModel>(), 5412var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5413_ = app.Services.GetRequiredService<Hosting.Orchestrator.ApplicationOrchestrator>(); 5438var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5473var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5504var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5536await using var appExecutor = CreateAppExecutor(app.Services.GetRequiredService<DistributedApplicationModel>(), kubernetesService: kubernetesService); 5560await using var appExecutor = CreateAppExecutor(app.Services.GetRequiredService<DistributedApplicationModel>(), kubernetesService: kubernetesService); 5582await using var appExecutor = CreateAppExecutor(app.Services.GetRequiredService<DistributedApplicationModel>(), kubernetesService: kubernetesService); 5602var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5639var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5662var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5709var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5733var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5768var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5813var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5845var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5881var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5921var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5952var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5983var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6013var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6042var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6108var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6157var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6209var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6236var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6273var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6301var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6343var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6378var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6413var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6453var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6493var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6537var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6583var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6625var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6667var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6704var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6722var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6783var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6820var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6875var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6926var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6975var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7069var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7102var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7150var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7187var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7228var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7264var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7306var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7348var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7390var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7427var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7464var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7467await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 7505var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7507await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 7540var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7579var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7621var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7656var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7708var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7763var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7859var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7899var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7974var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8033var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8085var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8130var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8201var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8305app.Services.GetRequiredService<DistributedApplicationModel>(), 8447app.Services.GetRequiredService<DistributedApplicationModel>(), 8534var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8624var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8739var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8792var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8840var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8884var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8926var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8965var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9023var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9063var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9090var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9144var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9190var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9225var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9276var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9322var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9363var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9408var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9444var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9506var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9562var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9599var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9635var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9670var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9721var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9759var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9794var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9833var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9868var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9939var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9971var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10011var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10065var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10120var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10171var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10224var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10257var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10301var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10343var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10390var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10432var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10469var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10513var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10589var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10663var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10725var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10784var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10820var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10857var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10963app.Services.GetRequiredService<DistributedApplicationModel>(), 11051app.Services.GetRequiredService<DistributedApplicationModel>(), 11125app.Services.GetRequiredService<DistributedApplicationModel>(), 11155app.Services.GetRequiredService<DistributedApplicationModel>(), 11179app.Services.GetRequiredService<DistributedApplicationModel>(), 11215app.Services.GetRequiredService<DistributedApplicationModel>(), 11238app.Services.GetRequiredService<DistributedApplicationModel>(), 11262app.Services.GetRequiredService<DistributedApplicationModel>(), 11293app.Services.GetRequiredService<DistributedApplicationModel>(), 11313var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11347var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11397var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11432var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11473var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11527app.Services.GetRequiredService<DistributedApplicationModel>(), 11559var read = builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(context.Resource, app.Services), context.CancellationToken); 11571app.Services.GetRequiredService<DistributedApplicationModel>(), 11644app.Services.GetRequiredService<DistributedApplicationModel>(), 11741var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11786var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11832var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11885var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11938var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11977var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12005var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12039var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12083var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12127var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12166var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12205var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12273var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12327var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12369var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12426var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12451var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12469var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12488var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12530var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12576var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12637var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12707var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12744var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12835var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12876var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12927var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 12976var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 13036var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 13043await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 13081var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 13110var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 13114await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 13156var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 13160await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 13462var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Dcp\DcpHostNotificationTests.cs (8)
76var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 173var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 218var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 263var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 317var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 385var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 819var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1009return 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 (18)
58var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 61var eventingSubscribers = app.Services.GetServices<IDistributedApplicationEventingSubscriber>(); 71var options = app.Services.GetRequiredService<IOptions<PipelineOptions>>(); 82var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 93var pipelineOptions = app.Services.GetRequiredService<IOptions<PipelineOptions>>(); 104var pipelineOptions = app.Services.GetRequiredService<IOptions<PipelineOptions>>(); 115var config = app.Services.GetRequiredService<IConfiguration>(); 189var filterOptions = app.Services.GetRequiredService<IOptions<LoggerFilterOptions>>().Value; 232Assert.Null(app.Services.GetRequiredService<DistributedApplicationOptions>().Configuration); 256Assert.Null(app.Services.GetRequiredService<DistributedApplicationOptions>().Configuration); 283var outputService = app.Services.GetRequiredService<IPipelineOutputService>(); 295var outputService = app.Services.GetRequiredService<IPipelineOutputService>(); 306var outputService = app.Services.GetRequiredService<IPipelineOutputService>(); 316var config = app.Services.GetRequiredService<IConfiguration>(); 329var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger("AspireLogLevelTest"); 345var factory = app.Services.GetRequiredService<ILoggerFactory>(); 352var backchannel = app.Services.GetRequiredService<BackchannelLoggerProvider>(); 876var config = app.Services.GetRequiredService<IConfiguration>();
DistributedApplicationModelExtensionsTests.cs (2)
28var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 63var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
DistributedApplicationTests.cs (65)
253var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 254var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 255var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 298var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 299var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 300var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 396var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 424var lifetime = app.Services.GetRequiredService<IHostApplicationLifetime>(); 457var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 458var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 611var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 612var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 613var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 698var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 699var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 700var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 852var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 909var s = app.Services.GetRequiredService<IKubernetesService>(); 966var s = app.Services.GetRequiredService<IKubernetesService>(); 1010var s = app.Services.GetRequiredService<IKubernetesService>(); 1084var s = app.Services.GetRequiredService<IKubernetesService>(); 1085var dc = app.Services.GetRequiredService<IDeveloperCertificateService>(); 1178var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 1179var s = app.Services.GetRequiredService<IKubernetesService>(); 1216var s = app.Services.GetRequiredService<IKubernetesService>(); 1217var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1256var s = app.Services.GetRequiredService<IKubernetesService>(); 1257var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1285var events = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 1292var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1293var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 1294var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1332var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1333var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 1334var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1379var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1383var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1428var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1432var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1460var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1464var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1497var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1501var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1530var dashboardServiceHost = app.Services.GetRequiredService<DashboardServiceHost>(); 1560var dashboardServiceHost = app.Services.GetRequiredService<DashboardServiceHost>(); 1593var s = app.Services.GetRequiredService<IKubernetesService>(); 1595var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1621var s = app.Services.GetRequiredService<IKubernetesService>(); 1623var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1649var s = app.Services.GetRequiredService<IKubernetesService>(); 1651var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1678var s = app.Services.GetRequiredService<IKubernetesService>(); 1680var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1707var s = app.Services.GetRequiredService<IKubernetesService>(); 1932var s = app.Services.GetRequiredService<IKubernetesService>(); 2008var s = app.Services.GetRequiredService<IKubernetesService>(); 2098var s = app.Services.GetRequiredService<IKubernetesService>(); 2139var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 2195var rns = secondRun.App.Services.GetRequiredService<ResourceNotificationService>(); 2241var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 2292var s = app.Services.GetRequiredService<IKubernetesService>(); 2294var lifecycles = app.Services.GetServices<IDistributedApplicationLifecycleHook>(); 2321var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 2322var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 2386var 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)); 528var pipeline = Assert.IsType<DistributedApplicationPipeline>(app.Services.GetRequiredService<IDistributedApplicationPipeline>()); 530app.Services.GetRequiredService<DistributedApplicationModel>(), 531app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 532app.Services,
Eventing\DistributedApplicationBuilderEventingTests.cs (7)
204var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 354var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 363var testEvent = new ResourceStoppedEvent(resource.Resource, app.Services, testResourceEvent); 459var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 462var testEvent = new BeforePublishEvent(app.Services, new([])); 482var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 485var testEvent = new AfterPublishEvent(app.Services, new([]));
ExternalServiceTests.cs (4)
173var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, DistributedApplicationOperation.Publish, app.Services).DefaultTimeout(); 425var healthCheckService = app.Services.GetService<HealthCheckService>(); 446var healthCheckService = app.Services.GetService<HealthCheckService>(); 463var 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 (7)
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>(); 664var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>();
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();
InteractionServiceTests.cs (9)
234var interactionService = app.Services.GetRequiredService<IInteractionService>(); 235var consumerState = app.Services.GetRequiredService<InteractionServiceConsumerState>(); 258var consumerState = app.Services.GetRequiredService<InteractionServiceConsumerState>(); 259var interactionService = app.Services.GetRequiredService<IInteractionService>(); 275var consumerState = app.Services.GetRequiredService<InteractionServiceConsumerState>(); 276var interactionService = app.Services.GetRequiredService<IInteractionService>(); 286Assert.Same(app.Services, wrapper.Services); 288Assert.True(wrapper.Services.GetRequiredService<IInteractionService>().IsAvailable);
KestrelConfigTests.cs (1)
356var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
ManifestExpressionTests.cs (30)
45var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()); 72var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()); 97var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>(), workspace.Path) 174var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()); 198var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()); 226var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 255var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()); 276var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()); 294app.Services.GetRequiredService<DistributedApplicationModel>())); 308var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 329var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()); 344var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()); 364var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()); 392var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()); 422var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()) 443var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>(), workspace.Path) 459var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()) 482var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()); 505var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()); 524app.Services.GetRequiredService<DistributedApplicationModel>(), workspace.Path); 552var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()); 575var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()); 594app.Services.GetRequiredService<DistributedApplicationModel>())); 611app.Services.GetRequiredService<DistributedApplicationModel>())); 636var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()); 658var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()); 673app.Services.GetRequiredService<DistributedApplicationModel>()); 686var manifest = await ManifestUtils.GetManifestForModel(app.Services.GetRequiredService<DistributedApplicationModel>()); 704app.Services.GetRequiredService<DistributedApplicationModel>())); 730app.Services.GetRequiredService<DistributedApplicationModel>(), cts.Token));
Orchestrator\ApplicationOrchestratorTests.cs (79)
51app.Services.GetRequiredService<DistributedApplicationModel>(), 56[new(first.Resource, app.Services), new(second.Resource, app.Services)], 104var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 109[new(first.Resource, app.Services), new(second.Resource, app.Services)], 139var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 143[new(first.Resource, app.Services), new(second.Resource, app.Services)], 175var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 179await orchestrator.PublishEndpointsAllocatedAsync([new(first.Resource, app.Services)], 186await orchestrator.PublishEndpointsAllocatedAsync([new(second.Resource, app.Services)], 205var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 209await orchestrator.PublishEndpointsAllocatedAsync([new(resource.Resource, app.Services)], 213await orchestrator.PublishEndpointsAllocatedAsync([new(other.Resource, app.Services)], 245await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new(frontend.Resource, app.Services), default); 271await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new(frontend.Resource, app.Services), default); 310var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 315[new(frontend.Resource, app.Services)], builder.Eventing, dispatchBehavior, cts.Token); 370var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), notifications, 376await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 384var environment = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(backend.Resource, DistributedApplicationOperation.Run, app.Services).DefaultTimeout(); 415var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 418await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 419await orchestrator.PublishEndpointsAllocatedAsync([new(manager.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 442var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 446var publish = orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 479var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 482await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 500var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 504await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default).DefaultTimeout(); 527var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 530await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 548var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 551await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 576var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 579await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 583await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 610var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 646var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 694var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 740var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 791var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 859var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 912var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 964var e = Assert.Throws<InvalidOperationException>(() => app.Services.GetService<ApplicationOrchestrator>()); 983var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1028var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1070var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1076await applicationEventing.PublishAsync(new ConnectionStringAvailableEvent(resource.Resource, app.Services), CancellationToken.None); 1165app.Services.GetRequiredService<DistributedApplicationModel>(), 1221app.Services.GetRequiredService<ResourceLoggerService>(), 1223app.Services), cts.Token); 1269var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1278await applicationEventing.PublishAsync(new ConnectionStringAvailableEvent(resource.Resource, app.Services), CancellationToken.None); 1279await applicationEventing.PublishAsync(new ConnectionStringAvailableEvent(resource.Resource, app.Services), CancellationToken.None); 1313var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1342var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1380var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1412var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1448var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1491app.Services.GetRequiredService<DistributedApplicationModel>(), 1553app.Services.GetRequiredService<DistributedApplicationModel>(), 1578Services = app.Services 1622var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1682var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1731var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1784var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1850var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1891var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1954var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1989var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2249var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2297var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2347var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2404var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2459var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2514var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 2554var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(),
Orchestrator\ParameterProcessorTests.cs (11)
822var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 847var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 867var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 893var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 916var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 938var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 963var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 994var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1032var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1036var parameterProcessor = app.Services.GetRequiredService<ParameterProcessor>(); 1065var 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 (6)
47var statePath = app.Services.GetRequiredService<IDeploymentStateManager>().StateFilePath; 1041app.Services.GetRequiredService<DistributedApplicationModel>(), 1042app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1043app.Services, 1044app.Services.GetRequiredService<ILogger<DistributedApplicationPipelineTests>>(), 2661var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Pipelines\PipelineOutputDiffingLifetimeTests.cs (9)
67var pipeline = Assert.IsType<DistributedApplicationPipeline>(app.Services.GetRequiredService<IDistributedApplicationPipeline>()); 126PipelineContext NewContext() => new(app.Services.GetRequiredService<DistributedApplicationModel>(), 127app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), app.Services, 132app.Services.GetRequiredService<IOptions<PipelineOptions>>().Value.Step = target; 161var pipeline = Assert.IsType<DistributedApplicationPipeline>(app.Services.GetRequiredService<IDistributedApplicationPipeline>()); 162var context = new PipelineContext(app.Services.GetRequiredService<DistributedApplicationModel>(), 163app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), app.Services,
Pipelines\PipelineOutputDiffingTests.cs (17)
38var snapshotter = app.Services.GetService<IPipelineOutputSnapshotter<PipelineOutputSnapshot>>(); 39var comparer = app.Services.GetService<IPipelineOutputComparer<PipelineOutputSnapshot>>(); 40var options = app.Services.GetRequiredService<IOptions<PipelineOutputDiffOptions>>().Value; 77var options = app.Services.GetRequiredService<IOptions<PipelineOutputDiffOptions>>().Value; 196var hasher = Assert.IsType<ByteOutputFileHasher>(app.Services.GetRequiredService<IPipelineOutputFileHasher>()); 276var pipeline = Assert.IsType<DistributedApplicationPipeline>(app.Services.GetRequiredService<IDistributedApplicationPipeline>()); 277var context = new PipelineContext(app.Services.GetRequiredService<DistributedApplicationModel>(), 278app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), app.Services, 313var pipeline = Assert.IsType<DistributedApplicationPipeline>(app.Services.GetRequiredService<IDistributedApplicationPipeline>()); 314var context = new PipelineContext(app.Services.GetRequiredService<DistributedApplicationModel>(), 315app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), app.Services, 1060private static Task ExecuteAsync(DistributedApplication app) => app.Services.GetRequiredService<IDistributedApplicationPipeline>().ExecuteAsync( 1061new PipelineContext(app.Services.GetRequiredService<DistributedApplicationModel>(), 1062app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), app.Services,
Pipelines\PipelineOutputResolutionTests.cs (6)
51var pipeline = Assert.IsType<DistributedApplicationPipeline>(app.Services.GetRequiredService<IDistributedApplicationPipeline>()); 86var pipeline = Assert.IsType<DistributedApplicationPipeline>(app.Services.GetRequiredService<IDistributedApplicationPipeline>()); 201app.Services.GetRequiredService<DistributedApplicationModel>(), 202app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), app.Services, 206app.Services.GetRequiredService<IDistributedApplicationPipeline>().ExecuteAsync(NewContext(app));
Pipelines\PipelineOutputSelectionTests.cs (3)
435var options = app.Services.GetRequiredService<IOptions<PipelineOutputDiffOptions>>().Value; 470var options = app.Services.GetRequiredService<IOptions<PipelineOutputDiffOptions>>(); 499var options = app.Services.GetRequiredService<IOptions<PipelineOutputDiffOptions>>();
Pipelines\PipelineOutputStrategyTests.cs (1)
662var nativeSnapshotter = throughDi ? app.Services.GetRequiredService<IPipelineOutputSnapshotter<PipelineOutputSnapshot>>() : new DefaultPipelineOutputSnapshotter(snapshotter, new DefaultProcessRunner(), Options.Create(new PipelineOutputDiffOptions { Mode = mode }));
ProjectRebuilderResourceTests.cs (8)
33new BeforeResourceStartedEvent(rebuilder, app.Services), 37new BeforeResourceStartedEvent(rebuilder, app.Services), 39var args = await ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services); 71new BeforeResourceStartedEvent(rebuilder, app.Services), 73var args = await ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services); 99app.Services.GetRequiredService<DistributedApplicationOptions>().GlobalArtifactsPath = artifactsPath; 104new BeforeResourceStartedEvent(rebuilder, app.Services), 106var args = await ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services);
ProjectResourceTests.cs (28)
129var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 241var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 264var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 287var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 314var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 332var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 348var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 398var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 418var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 461var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 504var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 526var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 551var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 581var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 600var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 624var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 672var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 772var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 803var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 821var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 839var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 858var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 876var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 921var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 958var fakeContainerRuntime = (FakeContainerRuntime)app.Services.GetRequiredService<IContainerRuntime>(); 1018var imageManager = (MockImageBuilder)app.Services.GetRequiredService<IResourceContainerImageManager>(); 1128new BeforeResourceStartedEvent(appResource.Resource, app.Services), 1150var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\ContainerRuntimeResolverTests.cs (1)
75var resolver = app.Services.GetRequiredService<IContainerRuntimeResolver>();
Publishing\DotnetProgramArchiveTests.cs (8)
328var warnings = app.Services.GetFakeLogCollector().GetSnapshot() 422var warnings = app.Services.GetFakeLogCollector().GetSnapshot() 524ExecutionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>() 657return app.Services.GetRequiredService<IResourceContainerImageManager>().BuildImageAsync(resource, cancellationToken); 660var pipeline = Assert.IsType<DistributedApplicationPipeline>(app.Services.GetRequiredService<IDistributedApplicationPipeline>()); 662app.Services.GetRequiredService<DistributedApplicationModel>(), 663app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 664app.Services,
Publishing\PipelineExecutorTests.cs (1)
40var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>();
Publishing\PodmanSaveArgumentsTests.cs (1)
117new ValueProviderContext { ExecutionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>() },
Publishing\ResourceContainerImageManagerTests.cs (97)
43var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 47var collector = app.Services.GetFakeLogCollector(); 79var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 132var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 185var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 189var collector = app.Services.GetFakeLogCollector(); 218var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 222var collector = app.Services.GetFakeLogCollector(); 257var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 261var collector = app.Services.GetFakeLogCollector(); 293var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 297var collector = app.Services.GetFakeLogCollector(); 325var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 329var collector = app.Services.GetFakeLogCollector(); 363var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 368var collector = app.Services.GetFakeLogCollector(); 408var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 413var collector = app.Services.GetFakeLogCollector(); 453var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 459new ValueProviderContext { ExecutionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>() }, 503var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 507var collector = app.Services.GetFakeLogCollector(); 537var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 541var collector = app.Services.GetFakeLogCollector(); 568var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 574var collector = app.Services.GetFakeLogCollector(); 619var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 625var collector = app.Services.GetFakeLogCollector(); 648var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 672var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 709var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 742var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 775var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 825var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 847new ValueProviderContext { ExecutionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>() }, 871var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 908var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 920new ValueProviderContext { ExecutionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>() }, 952var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 955var warnings = app.Services.GetFakeLogCollector().GetSnapshot() 992var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1031var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1040new ValueProviderContext { ExecutionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>() }, 1066var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1074var collector = app.Services.GetFakeLogCollector(); 1105var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1128var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1169var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1174var collector = app.Services.GetFakeLogCollector(); 1218var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1259var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1336var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1349ExecutionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>() 1404var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1447var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1489var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1533var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1590var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1719var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1798var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1802var collector = app.Services.GetFakeLogCollector(); 1872var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1968var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 2021var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 2117var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 2119app.Services, 2158var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 2160app.Services, 2187var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 2189app.Services, 2216var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 2220app.Services, 2249var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 2252app.Services, 2280var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 2282app.Services, 2302var container = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<ContainerResource>()); 2303var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 2305app.Services, 2307app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 2326var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 2328app.Services, 2376var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 2378app.Services, 2409var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 2411app.Services, 2444var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 2446app.Services, 2453Assert.Equal(app.Services, capturedServices); 2486var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 2536var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 2571var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 2618var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 2653var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 2689var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 2699var containerRuntime = await app.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(cts.Token); 2717var containerRuntime = await app.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(cancellationToken);
Publishing\WslcContainerRuntimeTests.cs (2)
197var manager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 235var manager = app.Services.GetRequiredService<IResourceContainerImageManager>();
PythonAppDeployPipelineTests.cs (5)
32var pipeline = Assert.IsType<DistributedApplicationPipeline>(app.Services.GetRequiredService<IDistributedApplicationPipeline>()); 34app.Services.GetRequiredService<DistributedApplicationModel>(), 35app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 36app.Services, 37app.Services.GetRequiredService<ILogger<PythonAppDeployPipelineTests>>(),
RequiredCommandAnnotationTests.cs (47)
139var subscribers = app.Services.GetServices<IDistributedApplicationEventingSubscriber>(); 153var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 155var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 157await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 169var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 171var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 174await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 187var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 189var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 192await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 212var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 214var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 215await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 239var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 241var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 242await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 269var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 271var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 273await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)) 299var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 301var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 304await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 319var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 322var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 325await eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 326await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services)); 351var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 354var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 356await eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 357await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services)); 386var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 389var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 391await eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 392await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services)); 411var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 413var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 416var publishTask = eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 443var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 445var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 447await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 468var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 471var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 474var publishTask1 = eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 480await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services)); 516var eventSubscribers = app.Services.GetServices<IDistributedApplicationEventingSubscriber>(); 517var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 518var execContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>();
ResourceCommandAnnotationTests.cs (2)
204Services = app.Services, 215Assert.Equal(app.Services.GetRequiredService<IHostApplicationLifetime>().ApplicationStopping, cancellationToken);
ResourceCommandServiceTests.cs (5)
1359var interactionService = app.Services.GetRequiredService<InteractionService>(); 1588var baselineIsAvailable = app.Services.GetRequiredService<IInteractionService>().IsAvailable; 1762var resourceNotificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1808var resourceNotificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1809var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>();
ResourceFailureLoggingTests.cs (4)
36logCollector = app.Services.GetFakeLogCollector(); 37var logForwarder = app.Services.GetServices<IHostedService>().OfType<ResourceLoggerForwarderService>().Single(); 71logCollector = app.Services.GetFakeLogCollector(); 102var 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)
577var collector = app.Services.GetFakeLogCollector();
WithBindMountTests.cs (3)
198var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 199await eventing.PublishAsync(new BeforeResourceStartedEvent(container.Resource, app.Services)); 200await eventing.PublishAsync(new BeforeResourceStartedEvent(container.Resource, app.Services));
WithEndpointTests.cs (2)
231var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 758var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
WithEnvironmentTests.cs (1)
38var serviceProvider = app.Services.GetRequiredService<IServiceProvider>();
WithHttpCommandTests.cs (1)
117var httpClientFactory = app.Services.GetService<IHttpClientFactory>();
WithMcpServerTests.cs (6)
30var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 57var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 82var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 107var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 137var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 206var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
WithOtlpExporterTests.cs (17)
45var serviceProvider = app.Services.GetRequiredService<IServiceProvider>(); 70var serviceProvider = app.Services.GetRequiredService<IServiceProvider>(); 95serviceProvider: app.Services).DefaultTimeout(); 117serviceProvider: app.Services).DefaultTimeout(); 140serviceProvider: app.Services).DefaultTimeout(); 173var serviceProvider = app.Services.GetRequiredService<IServiceProvider>(); 204var serviceProvider = app.Services.GetRequiredService<IServiceProvider>(); 233var serviceProvider = app.Services.GetRequiredService<IServiceProvider>(); 258var serviceProvider = app.Services.GetRequiredService<IServiceProvider>(); 314var serviceProvider = app.Services.GetRequiredService<IServiceProvider>(); 315var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 325var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 350serviceProvider: app.Services 369serviceProvider: app.Services 402serviceProvider: app.Services 421serviceProvider: app.Services 445app.Services
WithProcessCommandTests.cs (4)
441app.Services.GetRequiredService<IConfiguration>(), 442app.Services.GetRequiredService<ProfilingTelemetry>(), 443app.Services); 744var loggerService = app.Services.GetRequiredService<ResourceLoggerService>();
WithTerminalTests.cs (32)
355var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 356await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 362var environment = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(host, serviceProvider: app.Services); 376var parentEnvironment = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(resource.Resource, serviceProvider: app.Services); 410var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 411await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 417var environment = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(host, serviceProvider: app.Services); 446var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 447await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 524var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 525await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 614var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 615await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 666var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 667await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1062var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1063await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1078var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1079await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1096var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1097await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1426var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1427await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1448var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1449await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1475var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1476await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1497var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1498await Assert.ThrowsAsync<IOException>(async () => await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model))); 1541var cleanupService = app.Services.GetRequiredService<TerminalHostOrphanCleanupService>(); 1549var cleanupService = app.Services.GetRequiredService<TerminalHostOrphanCleanupService>(); 1550var executionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>();
WithUrlsTests.cs (8)
151var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 652var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 677var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 708var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 739var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 820var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 1153var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 1205var rns = app.Services.GetRequiredService<ResourceNotificationService>();
WithVolumeTests.cs (15)
36app.Services); 84serviceProvider: app.Services); 88var storePrefix = Path.GetFullPath(app.Services.GetRequiredService<IAspireStore>().BasePath) + Path.DirectorySeparatorChar; 128serviceProvider: app.Services); 148var creator = app.Services.GetRequiredService<ContainerCreator>(); 165var store = app.Services.GetRequiredService<IAspireStore>(); 170serviceProvider: app.Services); 208var store = app.Services.GetRequiredService<IAspireStore>(); 217serviceProvider: app.Services); 220serviceProvider: app.Services); 241app.Services); 245app.Services); 279app.Services)); 300app.Services); 318app.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)
56Services = app.Services, 76var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 87Services = app.Services, 110Services = 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>();