Implemented interface member:
property
Services
Microsoft.Extensions.Hosting.IHost.Services
3192 references to Services
Aspire.Hosting (2)
DistributedApplication.cs (1)
326/// exposes a <see cref="Services"/> property which allows developers to get services from the
DistributedApplicationBuilder.cs (1)
921_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)
218var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 248var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 537var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 881var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 883var options = app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value; 886workspace.Path, options, app.Services, NullLogger<AzurePublishingContext>.Instance, step); 905var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 910app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value, 911app.Services, 931var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 935app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value, 936app.Services, 963var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 968app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value, 969app.Services, 994var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 999app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value, 1000app.Services, 1034var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1036var options = app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value; 1039workspace.Path, options, app.Services, NullLogger<AzurePublishingContext>.Instance, step); 1170_ = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 1172await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None); 1285_ = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 1286await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None); 1311_ = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 1313await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None); 1336_ = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 1338var publish = builder.Eventing.PublishResourceEndpointsAllocatedAsync(new(web.Resource, app.Services), cts.Token); 1346await using var logs = app.Services.GetRequiredService<ResourceLoggerService>() 1380_ = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 1381await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new(web.Resource, app.Services), CancellationToken.None); 1397_ = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 1399await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None); 1456_ = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 1457await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None); 1489_ = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 1490await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None); 1510_ = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 1511await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None); 1873node.Resource, DistributedApplicationOperation.Run, app.Services).AsTask(); 1947node.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 (7)
KustoFunctionalTests.cs (7)
55var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 108var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 188var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 192var snapshot = app.Services.GetRequiredService<FakeLogCollector>().GetSnapshot(); 216var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 224var snapshot = app.Services.GetRequiredService<FakeLogCollector>().GetSnapshot(); 257var rns = app.Services.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Azure.Tests (800)
AzureApiManagementTests.cs (9)
1116var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1119Services = app.Services, 1830var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1939var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1975var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2009var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2061var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2121var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2169var 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)
65var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 112var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 141var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 181var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 258var reporter = app.Services.GetRequiredService<IPipelineActivityReporter>() as TestPipelineActivityReporter; 294var reporter = app.Services.GetRequiredService<IPipelineActivityReporter>() as TestPipelineActivityReporter; 328var reporter = app.Services.GetRequiredService<IPipelineActivityReporter>() as TestPipelineActivityReporter; 362var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 399var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 480var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 518var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 555var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 596var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 856var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 878var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 909var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 945var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 981var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1019var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1054var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1130var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1161var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1236var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1257var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1278var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1299var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1321var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1347var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1378var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1410var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1453var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1473app.Services.GetRequiredService<DistributedApplicationModel>(), 1475app.Services,
AzureBicepProvisionerTests.cs (1)
44var 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)
276var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 305var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 348var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 374var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 400var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 420var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 446var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 603var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 629var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureContainerAppExpressEndpointTests.cs (2)
401app.Services.GetRequiredService<DistributedApplicationModel>(), builder.ExecutionContext, 402app.Services, NullLogger.Instance, TestContext.Current.CancellationToken);
AzureContainerAppsTests.cs (74)
61var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 95var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 127var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 253var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 285var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 329var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 359var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 435var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 468var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 541var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 582var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 612var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 648var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 684var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 722var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 762var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 794var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 828var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 865var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 916var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 998var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1047var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1078var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1110var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1141var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1180var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1226var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1269var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1344var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1364var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1385var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1408var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1439var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1475var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1506var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1533var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1564var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1606var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1633var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1690var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1743var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1813var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1835var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1865var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1911var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2063var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2117var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2216var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2246var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2275var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2428var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2479var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2503var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2542var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2583var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2623var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2653var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2691var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2731var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2771var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2816var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2846var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2928var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2954var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2980var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3021var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3079var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3130var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3163var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3205var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3248var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3297var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3332app.Services.GetRequiredService<DistributedApplicationModel>(), 3334app.Services,
AzureContainerRegistryTests.cs (3)
27var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 49var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 87var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureCosmosDBEmulatorFunctionalTests.cs (3)
174var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 222var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 292var rns = app.Services.GetRequiredService<ResourceNotificationService>();
AzureCosmosDBExtensionsTests.cs (14)
206var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 317var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 354var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 804var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 806var beforeStartEvent = new BeforeStartEvent(app.Services, model); 836var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 838var beforeStartEvent = new BeforeStartEvent(app.Services, model); 865var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 867var beforeStartEvent = new BeforeStartEvent(app.Services, model); 895var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 897var beforeStartEvent = new BeforeStartEvent(app.Services, model); 1141() => builder.Eventing.PublishAsync(new ResourceReadyEvent(cosmos.Resource, app.Services))); 1158await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(cosmos.Resource, app.Services)); 1232var healthCheckService = app.Services.GetRequiredService<HealthCheckService>();
AzureDeployerTests.cs (16)
101var environment = Assert.Single(app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<AzureEnvironmentResource>()); 104var runtime = Assert.IsType<FakeContainerRuntime>(app.Services.GetRequiredService<IContainerRuntime>()); 199var runtime = Assert.IsType<FakeContainerRuntime>(app.Services.GetRequiredService<IContainerRuntime>()); 372var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 430var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 493var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 556var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 622var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 917var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 1152var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 1211var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 1438var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 1903var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 1994var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 2027var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 2091var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>();
AzureEnvironmentResourceExtensionsTests.cs (407)
73var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 98var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 109Services = app.Services, 155var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 157app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 158app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 172Services = app.Services, 181Services = app.Services, 208var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 210app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 211app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 229var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 230var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 265var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 267app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 268app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 282await LoadInputAsync(app.Services, inputs, suffix); 298var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 306Services = app.Services, 479var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 487await LoadInputAsync(app.Services, inputs, tenantInput); 497await LoadInputAsync(app.Services, inputs, subscriptionInput); 506await LoadInputAsync(app.Services, inputs, resourceGroupInput); 515await LoadInputAsync(app.Services, inputs, locationInput); 536var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 542await LoadInputAsync(app.Services, inputs, tenantInput); 551await LoadInputAsync(app.Services, inputs, subscriptionInput); 561await LoadInputAsync(app.Services, inputs, resourceGroupInput); 580var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 591await LoadInputAsync(app.Services, inputs, locationInput); 610var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 611var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 654Services = app.Services, 702var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 708Services = app.Services, 743var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 744var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 786var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 787var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 788var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 809var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 810var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 811var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 841var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 842var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 861var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 862var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 864var (steps, pipelineContext) = await CreateAzureEnvironmentPipelineStepsAsync(environmentResource, model, app.Services); 882var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 886app.Services.GetRequiredService<ResourceLoggerService>(), 888app.Services)); 921var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 922var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 950var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 951var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 972var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 973var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 993var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 995app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 996app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 998await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1042var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1043var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 1045app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1046app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1048await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1077var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1078var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 1080app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1081app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1083await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1093Services = app.Services, 1125var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1127app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1128app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1130await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1174Services = app.Services, 1237var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1239app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1240app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1242await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1258Services = app.Services, 1512var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1514app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1515app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1517await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1527Services = app.Services, 1570var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1572app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1573app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1575await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1591Services = app.Services, 1631var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1633app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1634app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1636await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1652Services = app.Services, 1692var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1693var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 1695app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1696app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1698await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1713Services = app.Services, 1747var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1748var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 1750app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1751app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1752var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 1754await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1819var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1820var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 1822app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1823app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1824var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 1826await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1848Services = app.Services, 1881var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1883app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1884app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1885var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 1887await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1906Services = app.Services, 1940var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1942app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 1943app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 1944var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 1946await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1957Services = app.Services, 1969Services = app.Services, 1996var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1997var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 1999app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2000app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2002await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2034var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2035var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2037app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2038app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2040await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2053Services = app.Services, 2101var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2102var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2104app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2105app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2107await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2137Services = app.Services, 2204var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2205var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2207app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2208app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2210await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2231Services = app.Services, 2275var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2276var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2278app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2279app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2282await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2302Services = app.Services, 2355var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2356var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2358app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2359app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2361await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2380Services = app.Services, 2394Services = app.Services, 2422var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2423var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2425app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2426app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2428await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2459Services = app.Services, 2500var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2501var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2503app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2504app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2506await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2523Services = app.Services, 2560var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2561var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2563app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2564app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2567await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2577Services = app.Services, 2621var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2622var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2624app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2625app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2628await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2637Services = app.Services, 2676var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2677var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 2702var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2704app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2705app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2707await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2714Services = app.Services, 2728Services = app.Services, 2778var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2779var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2781app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2782app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2784await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2791Services = app.Services, 2808Services = app.Services, 2866var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2867var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 2869app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2870app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2872await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2874var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 2889Services = app.Services, 2924var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2926app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2927app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2929await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2935Services = app.Services, 2976var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2978app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 2979app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 2981await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2988Services = app.Services, 3002Services = app.Services, 3038var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3039var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3041app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3042app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3045await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3055Services = app.Services, 3113var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3114var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3116app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3117app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3119await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3128Services = app.Services, 3168var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3169var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3171app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3172app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3174await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3181Services = app.Services, 3228var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3229var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3231app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3232app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3234await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3241Services = app.Services, 3272var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3273var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3275app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3276app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3278await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3296await LoadInputAsync(app.Services, commandInputs, commandLocationInput); 3302Services = app.Services, 3344var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3345var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3347app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3348app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3350await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3372Services = app.Services, 3411var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3412var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3414app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3415app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3417await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3433Services = app.Services, 3470var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3471var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3473app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3474app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3476await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3502Services = app.Services, 3536var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3537var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3539app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3540app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3542await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3559Services = app.Services, 3600var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3601var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3603app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3604app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3606await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3622Services = app.Services, 3665var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3666var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3668app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 3669app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 3671await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3693Services = app.Services, 3722var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3723var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3748Services = app.Services, 3780var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3781var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3788Services = app.Services, 3847var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3848var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3862Services = app.Services, 3897var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3910Services = app.Services, 3942var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3943var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 3966Services = app.Services, 3997var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 3999app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4000app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4002await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4004var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 4038var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4040app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4041app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4043await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4045var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 4084var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4085var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4087app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4088app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4090await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4113Services = app.Services, 4142var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4144app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4145app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4147await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4157var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 4178var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4179var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4181app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4182app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4184await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4192Services = app.Services, 4246var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4247var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4249app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4250app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4252await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4264Services = app.Services, 4326var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4327var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4329app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4330app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4332await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4344Services = app.Services, 4405var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4406var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4408app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4409app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4411await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4418Services = app.Services, 4456var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4457var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4459app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4460app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4462await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4470Services = app.Services, 4503var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4504var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4506app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4507app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4509await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4516Services = app.Services, 4549var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4550var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4552app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4553app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4555await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4562Services = app.Services, 4617var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4619app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 4620app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 4622await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4630Services = app.Services, 4653var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4654var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4656var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 4702var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4703var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4705var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 4750var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4751var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4753var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 4810var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4811var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 4813var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 4851var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4869Services = app.Services, 4910var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4921Services = app.Services, 4951var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4968Services = app.Services, 4998var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5000var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 5016Services = app.Services, 5053var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5054var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 5088var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5089var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 5090var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 5130var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5131var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 5133app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>(), 5134app.Services.GetRequiredService<DistributedApplicationExecutionContext>()); 5135var controller = app.Services.GetRequiredService<AzureProvisioningController>(); 5137await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 5154Services = app.Services, 5188var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5189var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 5190var controller = app.Services.GetRequiredService<AzureProvisioningController>();
AzureEnvironmentResourceTests.cs (7)
385var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 409var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 440var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 476var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 503var provisioningOptions = app.Services.GetRequiredService<IOptions<AzureProvisioningOptions>>().Value; 504var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger<AzurePublishingContext>(); 507return new AzurePublishingContext(outputPath, provisioningOptions, app.Services, logger, step);
AzureEventHubsExtensionsTests.cs (4)
291var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 353var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, Services = app.Services }, CancellationToken.None); 410var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, Services = app.Services }, CancellationToken.None); 480var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, Services = app.Services }, CancellationToken.None);
AzureFunctionsTests.cs (8)
169var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 192var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 635var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 668var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 696var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 725var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 756var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1076var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureKeyVaultTests.cs (1)
36var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureKustoExtensionsTests.cs (1)
24var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureManagedRedisExtensionsTests.cs (1)
37var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureManifestUtils.cs (1)
51var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureOpenAIExtensionsTests.cs (1)
61var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzurePostgresExtensionsTests.cs (4)
38var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 61var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 383var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 413var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureProvisioningResourceTests.cs (3)
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)
40var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 79var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 80await app.Services.GetRequiredService<AzureResourcePreparer>().PrepareResourcesAsync(model, default); 90await app.Services.GetRequiredService<AzureResourcePreparer>().PrepareResourcesAsync(model, default); 113var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 114var preparer = app.Services.GetRequiredService<AzureResourcePreparer>(); 192var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 240var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 286var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 341var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 406app.Services.GetRequiredService<DistributedApplicationModel>().Resources.OfType<AzureRoleAssignmentResource>(), 428var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 496var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 517var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 629var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 664var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 729var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 785var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 888var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 890app.Services.GetRequiredService<DistributedApplicationModel>(), 891app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 892app.Services, 893app.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)
139var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 371var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, Services = app.Services }, CancellationToken.None); 466var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, Services = app.Services }, CancellationToken.None); 518var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, Services = app.Services }, CancellationToken.None); 574var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, Services = app.Services }, CancellationToken.None); 1092var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureSignalRExtensionsTests.cs (2)
21var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 43var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureStorageEmulatorFunctionalTests.cs (6)
49var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 94var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 137var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 191var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 224var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 264var rns = app.Services.GetRequiredService<ResourceNotificationService>();
AzureStorageExtensionsTests.cs (1)
651var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureUserAssignedIdentityTests.cs (10)
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>();
ExistingAzureResourceTests.cs (2)
76var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 561var model = app.Services.GetRequiredService<DistributedApplicationModel>();
FoundryExtensionsTests.cs (13)
96var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 97Assert.Contains(app.Services.GetServices<global::Microsoft.Extensions.Hosting.IHostedService>(), service => service is FoundryLocalLifecycleService); 356.PublishAsync(new ResourceReadyEvent(foundry.Resource, app.Services), cancellation.Token) 573var httpClientFactory = app.Services.GetRequiredService<IHttpClientFactory>(); 669var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 715var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 735var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 753var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 797var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 828var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 865var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 905var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 944var 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)
113await AssertGatewayProcessLaunchPlanAsync(gateway.Resource, builder, app.Services); 269var imageBuilder = publishApp.Services.GetRequiredService<IResourceContainerImageManager>(); 270var 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)
237await builder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnel.Resource, app.Services)).DefaultTimeout(); 279await builder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnel.Resource, app.Services)).DefaultTimeout(); 317var monitor = app.Services.GetRequiredKeyedService<DevTunnelMonitor>(tunnel.Resource); 381var monitor = app.Services.GetRequiredKeyedService<DevTunnelMonitor>(tunnel.Resource); 859var monitor = app.Services.GetRequiredKeyedService<DevTunnelMonitor>(tunnel.Resource); 885var monitor = app.Services.GetRequiredKeyedService<DevTunnelMonitor>(tunnel.Resource); 891var 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)
891var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 944var 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 (182)
DotnetProjectBuildCoordinatorTests.cs (145)
82new BeforeResourceStartedEvent(buildResource, app.Services), 84var args = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 120new BeforeResourceStartedEvent(buildResource, app.Services), 122var args = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 161app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 164new BeforeResourceStartedEvent(buildResource, app.Services), 166var firstArgs = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 181new BeforeResourceStartedEvent(buildResource, app.Services), 183var secondArgs = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 226new BeforeResourceStartedEvent(buildResource, app.Services), 230app.Services); 243new BeforeResourceStartedEvent(rebuilder, app.Services), 247app.Services); 306new BeforeResourceStartedEvent(buildResource, app.Services), 308var buildArguments = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 311serviceProvider: app.Services); 451var fileArgs = await ArgumentEvaluator.GetArgumentListAsync(fileApp.Resource, app.Services); 654var launchArgs = await ArgumentEvaluator.GetArgumentListAsync(file.Resource, app.Services); 656var rebuildArgs = await ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services); 715new BeforeResourceStartedEvent(buildResource, app.Services), 717var buildArgs = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 735new BeforeResourceStartedEvent(rebuilder, app.Services), 737var rebuildArgs = await ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services); 747var fileArgs = await ArgumentEvaluator.GetArgumentListAsync(file.Resource, app.Services); 771app.Services.GetRequiredService<DistributedApplicationOptions>().GlobalArtifactsPath = 779new BeforeResourceStartedEvent(rebuilder, app.Services), 781var rebuildArgs = await ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services); 880app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 883new BeforeResourceStartedEvent(projectBuild, app.Services), 886new BeforeResourceStartedEvent(fileBuild, app.Services), 888var projectBuildArgs = await ArgumentEvaluator.GetArgumentListAsync(projectBuild, app.Services); 892var fileBuildArgs = await ArgumentEvaluator.GetArgumentListAsync(fileBuild, app.Services); 897var fileArgs = await ArgumentEvaluator.GetArgumentListAsync(file.Resource, app.Services); 960var args = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1485serviceProvider: app.Services); 1682serviceProvider: app.Services)); 1725new BeforeResourceStartedEvent(dependent, app.Services), 1740app.Services.GetFakeLogCollector().GetSnapshot(), 1774new BeforeResourceStartedEvent(project.Resource, app.Services), 1814new BeforeResourceStartedEvent(project.Resource, app.Services), 1839new BeforeResourceStartedEvent(buildResource, app.Services), 1851new ResourceStoppedEvent(buildResource, app.Services, stoppedEvent), 1853var logCollector = app.Services.GetFakeLogCollector(); 1863new BeforeResourceStartedEvent(project.Resource, app.Services), 1889new BeforeResourceStartedEvent(buildResource, app.Services), 1909new BeforeResourceStartedEvent(buildResource, app.Services), 1912new ResourceStoppedEvent(buildResource, app.Services, firstStoppedEvent), 1924new ResourceStoppedEvent(buildResource, app.Services, secondStoppedEvent), 1929new BeforeResourceStartedEvent(project.Resource, app.Services), 1933app.Services.GetFakeLogCollector().GetSnapshot(), 2004var loggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 2009new BeforeResourceStartedEvent(buildResource, app.Services), 2027await completion.Callback(app.Services, TestContext.Current.CancellationToken); 2068new BeforeResourceStartedEvent(target, app.Services), 2070var wait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 2081completion.Callback(app.Services, TestContext.Current.CancellationToken)); 2088Assert.Equal(2, app.Services.GetFakeLogCollector().GetSnapshot().Count( 2112app.Services.GetRequiredService<ResourceLoggerService>().SetConsoleLogsService( 2126var canceledWait = completion.Callback(app.Services, canceled.Token); 2128var firstWait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 2129var secondWait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 2141Assert.Single(app.Services.GetFakeLogCollector().GetSnapshot(), 2170app.Services.GetRequiredService<ResourceLoggerService>().SetConsoleLogsService( 2182var firstWait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 2188new BeforeResourceStartedEvent(buildResource, app.Services), 2195completion.Callback(app.Services, TestContext.Current.CancellationToken)); 2202Assert.Equal(2, app.Services.GetFakeLogCollector().GetSnapshot().Count( 2246completion.Callback(app.Services, completionCts.Token)); 2249var loggers = app.Services.GetRequiredService<ResourceLoggerService>(); 2253Assert.Single(app.Services.GetFakeLogCollector().GetSnapshot(), 2274app.Services.GetRequiredService<ResourceLoggerService>().SetConsoleLogsService( 2286new BeforeResourceStartedEvent(project.Resource, app.Services), 2297app.Services.GetRequiredService<ResourceLoggerService>().SetConsoleLogsService( 2330serviceProvider: app.Services); 2337serviceProvider: app.Services)); 2340serviceProvider: app.Services); 2373serviceProvider: app.Services); 2376serviceProvider: app.Services); 2410new BeforeResourceStartedEvent(buildResource, app.Services), 2414serviceProvider: app.Services); 2415await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, serviceProvider: app.Services); 2427new BeforeResourceStartedEvent(buildResource, app.Services), 2431serviceProvider: app.Services); 2437serviceProvider: app.Services); 2506serviceProvider: app.Services); 2529serviceProvider: app.Services)); 2579await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(buildResource, serviceProvider: app.Services)); 2586serviceProvider: app.Services); 2639new BeforeResourceStartedEvent(buildResource, app.Services), 2643serviceProvider: app.Services); 2657serviceProvider: app.Services); 2661serviceProvider: app.Services); 2687new BeforeResourceStartedEvent(rebuilder, app.Services), 2692serviceProvider: app.Services).AsTask(); 2694var refreshedArgumentsTask = ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services).AsTask(); 2697serviceProvider: app.Services).AsTask(); 2705var projectArguments = await ArgumentEvaluator.GetArgumentListAsync(project.Resource, app.Services); 2756new BeforeResourceStartedEvent(buildResource, app.Services), 2760serviceProvider: app.Services).AsTask(); 2766new BeforeResourceStartedEvent(rebuilder, app.Services), 2772var firstArguments = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 2786serviceProvider: app.Services); 2787var secondArguments = await ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services); 2832app.Services, 2837app.Services, 2892new BeforeResourceStartedEvent(buildResource, app.Services), 2898app.Services, 2915new BeforeResourceStartedEvent(rebuilder, app.Services), 2919app.Services, 2947app.Services, 2950app.Services.GetRequiredService<IHostApplicationLifetime>().StopApplication(); 2980serviceProvider: app.Services); 2983serviceProvider: app.Services); 2986serviceProvider: app.Services); 3043var arguments = await ArgumentEvaluator.GetArgumentListAsync(project.Resource, app.Services); 3087var firstArguments = await ArgumentEvaluator.GetArgumentListAsync(project.Resource, app.Services); 3096var secondArguments = await ArgumentEvaluator.GetArgumentListAsync(project.Resource, app.Services); 3377var args = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 3409var args = await ArgumentEvaluator.GetArgumentListAsync(buildResource, app.Services); 3439serviceProvider: app.Services); 3472serviceProvider: app.Services); 3505serviceProvider: app.Services); 4068var args = await ArgumentEvaluator.GetArgumentListAsync(missing.Resource, app.Services); 4132Assert.Equal(["exec", expectedTargetPath], await ArgumentEvaluator.GetArgumentListAsync(project.Resource, app.Services)); 4233Services = app.Services, 4274var wait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 4302var coordinator = app.Services.GetRequiredService<DotnetProjectBuildCoordinator.CoordinatorState>(); 4303var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 4383var wait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 4397var retry = completion.Callback(app.Services, TestContext.Current.CancellationToken); 4424var canceledWait = completion.Callback(app.Services, canceled.Token); 4425var otherWait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 4441await completion.Callback(app.Services, TestContext.Current.CancellationToken); 4466await completion.Callback(app.Services, TestContext.Current.CancellationToken); 4475var wait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 4509var wait = completion.Callback(app.Services, TestContext.Current.CancellationToken); 4515var retry = completion.Callback(app.Services, TestContext.Current.CancellationToken); 4542var coordinator = app.Services.GetRequiredService<DotnetProjectBuildCoordinator.CoordinatorState>(); 4570app.Services, 4684app.Services.GetRequiredService<ResourceLoggerService>(), 4743var orchestrator = app.Services.GetRequiredService<ApplicationOrchestratorProxy>(); 5218var coordinator = app.Services.GetRequiredService<DotnetProjectBuildCoordinator.CoordinatorState>(); 5219var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5221new BeforeStartEvent(app.Services, model), 5223await 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)
102var rendered = app.Services.GetRequiredService<ExecutableCreator>() 135app.Services.GetRequiredService<ExecutableCreator>().PrepareObjects(TestContext.Current.CancellationToken).ToArray()); 327var runtime = await app.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(cancellation.Token); 328var logger = app.Services.GetRequiredService<ILogger<DotnetProjectResourceTests>>(); 347var processRunner = app.Services.GetRequiredService<IProcessRunner>(); 355var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 409var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 511new BeforeResourceStartedEvent(rebuilder, app.Services), 513var args = await ArgumentEvaluator.GetArgumentListAsync(rebuilder, app.Services); 713var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 775var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 801var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 827var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 846var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 881var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 905var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 937var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 969var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 999var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 1042var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 1070var args = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 1111var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1113app.Services.GetRequiredService<DistributedApplicationModel>(), 1114app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1115app.Services, 1116app.Services.GetRequiredService<ILogger<DotnetProjectResourceTests>>(), 1170var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1181var runtime = await app.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(cancellation.Token); 1182var processRunner = app.Services.GetRequiredService<IProcessRunner>(); 1183var logger = app.Services.GetRequiredService<ILogger<DotnetProjectResourceTests>>();
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)
149app.Services, 170app.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 (21)
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>(), 720app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 743app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 927var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 929await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
ProjectResourceTests.cs (2)
112var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 134var model = app.Services.GetRequiredService<DistributedApplicationModel>();
ToolboxTests.cs (9)
801var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 829Services = app.Services, 851var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 865Services = app.Services, 891var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 912Services = app.Services, 926var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 943var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 945return new PipelineContext(model, execContext, app.Services, NullLogger.Instance, CancellationToken.None);
Aspire.Hosting.Garnet.Tests (6)
AddGarnetTests.cs (6)
22var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 50var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 79var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 343var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 364var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 381var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Go.Tests (34)
AddGoAppTests.cs (18)
559var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 597Services = application.Services 695var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 727var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 760var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(app.Resource, application.Services); 1037var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1064var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1126var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1147var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1170var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1190var pipeline = (DistributedApplicationPipeline)app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1219var pipeline = (DistributedApplicationPipeline)app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1617Services = app.Services 1629var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1660app.Services.GetRequiredService<DistributedApplicationModel>(), 1661app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1662app.Services, 1663app.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 (88)
AddBunAppTests.cs (3)
151var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 173var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 199var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AddDenoAppTests.cs (11)
1261var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1283var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1310var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1331var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1356var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1384var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1496var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1511var appModel = distributedApplication.Services.GetRequiredService<DistributedApplicationModel>(); 1528var appModel = distributedApplication.Services.GetRequiredService<DistributedApplicationModel>(); 1546var appModel = distributedApplication.Services.GetRequiredService<DistributedApplicationModel>(); 1705var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AddJavaScriptAppTests.cs (9)
220var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 258var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 280var pipeline = (DistributedApplicationPipeline)app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 302var pipeline = (DistributedApplicationPipeline)app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 326var pipeline = (DistributedApplicationPipeline)app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 777app.Services.GetRequiredService<DistributedApplicationModel>(), 778app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 779app.Services, 780app.Services.GetRequiredService<ILogger<AddJavaScriptAppTests>>(),
AddNodeAppTests.cs (7)
244var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 271var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 301var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 482var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 509var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 526var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 547var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AddViteAppTests.cs (25)
502var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 527var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 558var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 572ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 618var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 632ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 670var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 719var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 730ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 765var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 782ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 828var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 841ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 904var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 914ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 1005var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1019ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }), 1056var pipeline = (DistributedApplicationPipeline)app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1112var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1127app.Services.GetRequiredService<DistributedApplicationModel>(), 1128app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 1129app.Services, 1130app.Services.GetRequiredService<ILogger<AddViteAppTests>>(), 1135var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1140ExecutionContext = new DistributedApplicationExecutionContext(new DistributedApplicationExecutionContextOptions(DistributedApplicationOperation.Run) { Services = app.Services }),
AddViteAppWithPnpmTests.cs (4)
21var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 56var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 87var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 118var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
IntegrationTests.cs (2)
25var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 67var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
PackageInstallationTests.cs (17)
32var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 64var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 88var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 127var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 157var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 196var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 225var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 249var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 270var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 294var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 324var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 352var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 379var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 401var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 423var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 443var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 574var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
RequiredCommandTests.cs (2)
232var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 233await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel));
ResourceCreationTests.cs (8)
20var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 38var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 56var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 76var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 99var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 136var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 171var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 203var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Kafka.Tests (14)
AddKafkaTests.cs (14)
26var registration = Assert.Single(app.Services.GetRequiredService<IOptions<HealthCheckServiceOptions>>().Value.Registrations); 28var exception = Assert.Throws<InvalidOperationException>(() => registration.Factory(app.Services)); 31await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(kafka.Resource, app.Services)); 33var check = Assert.IsType<KafkaHealthCheck>(registration.Factory(app.Services)); 34Assert.Same(check, app.Services.GetRequiredKeyedService<KafkaHealthCheck>(registration.Name)); 47await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(kafka1.Resource, app.Services)); 48await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(kafka2.Resource, app.Services)); 50var registrations = app.Services.GetRequiredService<IOptions<HealthCheckServiceOptions>>().Value.Registrations; 64var check = app.Services.GetRequiredKeyedService<KafkaHealthCheck>(registration.Name); 68using var scope = app.Services.CreateScope(); 85var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 127var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 290var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 295new BeforeResourceStartedEvent(kafkaUiResource, app.Services),
Aspire.Hosting.Keycloak.Tests (6)
KeycloakPublicApiTests.cs (2)
165var entries = await containerAnnotation.Callback(new() { Model = keycloakResource, Services = app.Services }, CancellationToken.None); 190var entries = await containerAnnotation.Callback(new() { Model = keycloakResource, Services = app.Services }, CancellationToken.None);
KeycloakResourceBuilderTests.cs (4)
27var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 78var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 80var beforeStartEvent = new BeforeStartEvent(app.Services, model); 92var env = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(keycloak.Resource, serviceProvider: app.Services);
Aspire.Hosting.Kubernetes.Tests (62)
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)
29var env = app.Services.GetRequiredService<DistributedApplicationModel>() 46var env = app.Services.GetRequiredService<DistributedApplicationModel>() 60var env = app.Services.GetRequiredService<DistributedApplicationModel>() 75var env = app.Services.GetRequiredService<DistributedApplicationModel>() 90var env = app.Services.GetRequiredService<DistributedApplicationModel>() 110var env = app.Services.GetRequiredService<DistributedApplicationModel>() 128var env = app.Services.GetRequiredService<DistributedApplicationModel>() 145var env = app.Services.GetRequiredService<DistributedApplicationModel>() 162var env = app.Services.GetRequiredService<DistributedApplicationModel>() 177var env = app.Services.GetRequiredService<DistributedApplicationModel>() 192var env = app.Services.GetRequiredService<DistributedApplicationModel>() 209var env = app.Services.GetRequiredService<DistributedApplicationModel>() 226var env = app.Services.GetRequiredService<DistributedApplicationModel>() 246var env = app.Services.GetRequiredService<DistributedApplicationModel>() 263var env = app.Services.GetRequiredService<DistributedApplicationModel>() 279var env = app.Services.GetRequiredService<DistributedApplicationModel>() 295var env = app.Services.GetRequiredService<DistributedApplicationModel>() 721var env = app.Services.GetRequiredService<DistributedApplicationModel>() 815var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 817app.Services.GetRequiredService<DistributedApplicationModel>(), 818app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 819app.Services, 820app.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 (1)
2692var 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 (43)
AddMongoDBTests.cs (24)
45var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 73var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 104var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 140await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 170await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 398var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 468var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 469await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 493var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 494await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 519var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 520await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 540var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 541await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 578var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 579await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 619var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 620await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 639var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 640await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 657var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 658await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel));
ReplicaSet\AddMongoDBReplicaSetTests.cs (12)
36var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 86var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 107var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 124var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 223var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 224await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 332var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 333var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 348await eventing.PublishAsync(new ResourceStoppedEvent(mongo1.Resource, app.Services, stoppedResourceEvent)); 352await eventing.PublishAsync(new BeforeResourceStartedEvent(mongo1.Resource, app.Services)); 358await eventing.PublishAsync(new ResourceReadyEvent(mongo1.Resource, app.Services), staleReadyCts.Token); 362await eventing.PublishAsync(new ResourceReadyEvent(mongo1.Resource, app.Services));
SingleMemberReplicaSetFunctionalTests.cs (1)
205var orchestrator = app.Services.GetRequiredService<ApplicationOrchestratorProxy>();
SingleMemberReplicaSetTests.cs (2)
125await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()));
tests\Shared\ContainerReplCommandTestBase.cs (4)
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)
590var 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.Oracle.Tests (5)
AddOracleTests.cs (5)
42var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 81var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 119var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 139var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 162var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.PostgreSQL.Tests (18)
AddPostgresTests.cs (8)
53var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 107var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 177var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 222var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 403var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 524var entries = await createServers.Callback(new() { Model = pgadmin, Services = app.Services }, CancellationToken.None); 578var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 588var entries = await createBookmarks.Callback(new() { Model = pgweb, Services = app.Services }, CancellationToken.None);
PostgresFunctionalTests.cs (1)
572var rns = app.Services.GetRequiredService<ResourceNotificationService>();
PostgresMcpBuilderTests.cs (5)
27var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 55var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 88var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 111var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 128var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
tests\Shared\ContainerReplCommandTestBase.cs (4)
56Services = app.Services, 76var notifications = app.Services.GetRequiredService<ResourceNotificationService>(); 87Services = app.Services, 110Services = app.Services,
Aspire.Hosting.Python.Tests (65)
AddPythonAppTests.cs (65)
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>(); 904var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 935var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 960var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 979var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 998var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1019var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1055var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1089var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1121var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1145var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1167var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1193var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1306var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1325var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1436var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1455var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1478var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1497var pipeline = (DistributedApplicationPipeline)app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1526var pipeline = (DistributedApplicationPipeline)app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 1550var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1730var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1774var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1814var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1986var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 2347var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2382var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2436var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2457var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2484var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2512var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2536var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2568var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2611var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2641var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2677var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2713var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2742var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2774var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2804var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2837var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2869var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2894var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2922app.Services.GetRequiredService<DistributedApplicationModel>(), 2923app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 2924app.Services, 2925app.Services.GetRequiredService<ILogger<AddPythonAppTests>>(), 2935var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2936var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 2937await 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>(); 423var 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 (137)
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)
230_ = builder.Build().Services.GetRequiredService<DistributedApplicationModel>();
Publishing\BackingResourceProjectionTests.cs (5)
38var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 172var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 248var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 273var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 302var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\BackingResourceValueResolutionTests.cs (1)
25var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\BicepGenerationMultiResourceTests.cs (5)
25var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 50var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 70var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 89var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 108var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\BicepGenerationSimpleTests.cs (9)
25var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 45var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 64var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 82var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 102var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 123var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 144var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 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 (15)
47var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 53infrastructure.BuildAsync(app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), default)); 73var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 78var options = await infrastructure.BuildAsync(app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), default); 104var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 109var options = await infrastructure.BuildAsync(app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), default); 149var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 173var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 230var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 270var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 293var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 322var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 349var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 379var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 405var 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)
106var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 136var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 161var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 183var 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)
41var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 69var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 100var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 119var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 136var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 153var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 178var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 207var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 233var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 302var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 303var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 306await eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 328var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 329var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 332await eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 534var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 565await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 591await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 612await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 875var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 901var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 996var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 999var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 1035var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1037await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 1039var args = await ArgumentEvaluator.GetArgumentListAsync(redis.Resource, app.Services).AsTask().WaitAsync(TimeSpan.FromSeconds(60)); 1069var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1072var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 1097var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1100var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
RedisFunctionalTests.cs (5)
295var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 630var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 665var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 784var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 794var clientFactory = app.Services.GetRequiredService<IHttpClientFactory>();
tests\Shared\ContainerReplCommandTestBase.cs (4)
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 (15)
AddSqlServerTests.cs (11)
47var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 94var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 116var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 280var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 314var registrations = app.Services.GetRequiredService<IOptions<HealthCheckServiceOptions>>().Value.Registrations; 318Assert.Equal("Connection string is unavailable", Assert.Throws<InvalidOperationException>(() => serverRegistration.Factory(app.Services)).Message); 319Assert.Equal("Connection string is unavailable", Assert.Throws<InvalidOperationException>(() => dbRegistration.Factory(app.Services)).Message); 321await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(sqlServer.Resource, app.Services)); 322await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(db.Resource, app.Services)); 324Assert.IsType<SqlServerHealthCheck>(serverRegistration.Factory(app.Services)); 325Assert.IsType<SqlServerHealthCheck>(dbRegistration.Factory(app.Services));
tests\Shared\ContainerReplCommandTestBase.cs (4)
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)
52Assert.Same(app.Services.GetRequiredService<IFileSystemService>(), fileSystemService); 125var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 202var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 447var hostEnvironment = app.Services.GetRequiredService<IHostEnvironment>(); 463var config = app.Services.GetRequiredService<IConfiguration>(); 625var dashboardServiceHost = app.Services.GetRequiredService<DashboardServiceHost>(); 653var 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 (1189)
AddConnectionStringTests.cs (2)
27var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 56var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AddParameterTests.cs (13)
59var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 175var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 370var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 406var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 439var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 478var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 559var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 628var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 660var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1127var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1151var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1174var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1200var 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 (205)
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); 447await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 449var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 461app.Services.GetRequiredService<IConfiguration>(), 462app.Services.GetRequiredService<ProfilingTelemetry>(), 463app.Services); 496await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 498var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 511app.Services.GetRequiredService<IConfiguration>(), 512app.Services.GetRequiredService<ProfilingTelemetry>(), 513app.Services); 558await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 560var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 574app.Services.GetRequiredService<IConfiguration>(), 575app.Services.GetRequiredService<ProfilingTelemetry>(), 576app.Services); 588await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 634await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 636var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 648app.Services.GetRequiredService<IConfiguration>(), 649app.Services.GetRequiredService<ProfilingTelemetry>(), 650app.Services); 662await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 704await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 706var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 720app.Services.GetRequiredService<IConfiguration>(), 721app.Services.GetRequiredService<ProfilingTelemetry>(), 722app.Services); 775await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 777var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 790app.Services.GetRequiredService<IConfiguration>(), 791app.Services.GetRequiredService<ProfilingTelemetry>(), 792app.Services); 816app.Services.GetRequiredService<IConfiguration>(), 817app.Services.GetRequiredService<ProfilingTelemetry>(), 818app.Services); 864await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 866var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 882app.Services.GetRequiredService<IConfiguration>(), 883app.Services.GetRequiredService<ProfilingTelemetry>(), 884app.Services); 918await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 926var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 939app.Services.GetRequiredService<IConfiguration>(), 940app.Services.GetRequiredService<ProfilingTelemetry>(), 941app.Services); 974app.Services.GetRequiredService<IConfiguration>(), 975app.Services.GetRequiredService<ProfilingTelemetry>(), 976app.Services); 988var executionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>(); 1022app.Services.GetRequiredService<IConfiguration>(), 1023app.Services.GetRequiredService<ProfilingTelemetry>(), 1024app.Services); 1046var executionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>(); 1077await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 1079var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1091app.Services.GetRequiredService<IConfiguration>(), 1092app.Services.GetRequiredService<ProfilingTelemetry>(), 1093app.Services); 1128await PrimeEnvironmentCallbackCacheAsync(owner.Resource, app.Services).DefaultTimeout(); 1130var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1134app.Services.GetRequiredService<IConfiguration>(), 1135app.Services.GetRequiredService<ProfilingTelemetry>(), 1136app.Services); 1195var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1207app.Services.GetRequiredService<IConfiguration>(), 1208app.Services.GetRequiredService<ProfilingTelemetry>(), 1209app.Services); 1267var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1275app.Services.GetRequiredService<IConfiguration>(), 1276app.Services.GetRequiredService<ProfilingTelemetry>(), 1277app.Services); 1303var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1317app.Services.GetRequiredService<IConfiguration>(), 1318app.Services.GetRequiredService<ProfilingTelemetry>(), 1319app.Services); 1343var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1362app.Services.GetRequiredService<IConfiguration>(), 1363app.Services.GetRequiredService<ProfilingTelemetry>(), 1364app.Services); 1402var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1410app.Services.GetRequiredService<IConfiguration>(), 1411app.Services.GetRequiredService<ProfilingTelemetry>(), 1412app.Services); 1438var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1446app.Services.GetRequiredService<IConfiguration>(), 1447app.Services.GetRequiredService<ProfilingTelemetry>(), 1448app.Services); 1473app.Services.GetRequiredService<IConfiguration>(), 1474app.Services.GetRequiredService<ProfilingTelemetry>(), 1475app.Services); 1477var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1512app.Services.GetRequiredService<IConfiguration>(), 1513app.Services.GetRequiredService<ProfilingTelemetry>(), 1514app.Services); 1516var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 1551app.Services.GetRequiredService<IConfiguration>(), 1552app.Services.GetRequiredService<ProfilingTelemetry>(), 1553app.Services); 1586app.Services.GetRequiredService<IConfiguration>(), 1587app.Services.GetRequiredService<ProfilingTelemetry>(), 1588app.Services); 1621app.Services.GetRequiredService<IConfiguration>(), 1622app.Services.GetRequiredService<ProfilingTelemetry>(), 1623app.Services); 1693var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1704app.Services.GetRequiredService<IConfiguration>(), 1705app.Services.GetRequiredService<ProfilingTelemetry>(), 1706app.Services); 1734app.Services.GetRequiredService<IConfiguration>(), 1735app.Services.GetRequiredService<ProfilingTelemetry>(), 1736app.Services); 1760var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1775app.Services.GetRequiredService<IConfiguration>(), 1776app.Services.GetRequiredService<ProfilingTelemetry>(), 1777app.Services); 1805var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1819app.Services.GetRequiredService<IConfiguration>(), 1820app.Services.GetRequiredService<ProfilingTelemetry>(), 1821app.Services); 1851var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1863app.Services.GetRequiredService<IConfiguration>(), 1864app.Services.GetRequiredService<ProfilingTelemetry>(), 1865app.Services); 1893var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1907app.Services.GetRequiredService<IConfiguration>(), 1908app.Services.GetRequiredService<ProfilingTelemetry>(), 1909app.Services); 1940var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1955app.Services.GetRequiredService<IConfiguration>(), 1956app.Services.GetRequiredService<ProfilingTelemetry>(), 1957app.Services); 1986var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 1991var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 2007app.Services.GetRequiredService<IConfiguration>(), 2008app.Services.GetRequiredService<ProfilingTelemetry>(), 2009app.Services); 2046var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 2065app.Services.GetRequiredService<IConfiguration>(), 2066app.Services.GetRequiredService<ProfilingTelemetry>(), 2067app.Services); 2101var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 2116app.Services.GetRequiredService<IConfiguration>(), 2117app.Services.GetRequiredService<ProfilingTelemetry>(), 2118app.Services); 2149var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 2156app.Services.GetRequiredService<IConfiguration>(), 2157app.Services.GetRequiredService<ProfilingTelemetry>(), 2158app.Services); 2210var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2215var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 2224app.Services.GetRequiredService<IConfiguration>(), 2225app.Services.GetRequiredService<ProfilingTelemetry>(), 2226app.Services); 2335app.Services.GetRequiredService<IConfiguration>(), 2336app.Services.GetRequiredService<ProfilingTelemetry>(), 2337app.Services); 2390app.Services.GetRequiredService<IConfiguration>(), 2391app.Services.GetRequiredService<ProfilingTelemetry>(), 2392app.Services); 2451app.Services.GetRequiredService<IConfiguration>(), 2452app.Services.GetRequiredService<ProfilingTelemetry>(), 2453app.Services); 2520app.Services.GetRequiredService<IConfiguration>(), 2521app.Services.GetRequiredService<ProfilingTelemetry>(), 2522app.Services); 2597app.Services.GetRequiredService<IConfiguration>(), 2598app.Services.GetRequiredService<ProfilingTelemetry>(), 2599app.Services); 2647app.Services.GetRequiredService<IConfiguration>(), 2648app.Services.GetRequiredService<ProfilingTelemetry>(), 2649app.Services); 2702app.Services.GetRequiredService<IConfiguration>(), 2703app.Services.GetRequiredService<ProfilingTelemetry>(), 2704app.Services); 2734app.Services.GetRequiredService<IConfiguration>(), 2735app.Services.GetRequiredService<ProfilingTelemetry>(), 2736app.Services); 2761app.Services.GetRequiredService<IConfiguration>(), 2762app.Services.GetRequiredService<ProfilingTelemetry>(), 2763app.Services); 2790app.Services.GetRequiredService<IConfiguration>(), 2791app.Services.GetRequiredService<ProfilingTelemetry>(), 2792app.Services); 2811app.Services.GetRequiredService<IConfiguration>(), 2812app.Services.GetRequiredService<ProfilingTelemetry>(), 2813app.Services); 2844app.Services.GetRequiredService<IConfiguration>(), 2845app.Services.GetRequiredService<ProfilingTelemetry>(), 2846app.Services);
Backchannel\AuxiliaryBackchannelTests.cs (18)
36var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 76var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 128var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 143var logs = app.Services.GetFakeLogCollector().GetSnapshot() 161var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 196var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 237var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 281var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 325var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 361var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 402var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 439var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 459var lifetime = app.Services.GetService<IHostApplicationLifetime>(); 488var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 530var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 573var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 617var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 640var collector = app.Services.GetFakeLogCollector();
Backchannel\GetTerminalInfoAsyncTests.cs (2)
299var terminalService = app.Services.GetRequiredService<TerminalService>(); 306var target = CreateTarget(app.Services);
BuildOnlyContainerValidationTests.cs (5)
102var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>(); 104app.Services.GetRequiredService<DistributedApplicationModel>(), 105app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 106app.Services, 107app.Services.GetRequiredService<ILogger<BuildOnlyContainerValidationTests>>(),
Codespaces\CodespacesUrlRewriterTests.cs (1)
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 (256)
55app.Services.GetRequiredService<DistributedApplicationModel>(), 145app.Services.GetRequiredService<DistributedApplicationModel>(), 237app.Services.GetRequiredService<DistributedApplicationModel>(), 295app.Services.GetRequiredService<DistributedApplicationModel>(), 339app.Services.GetRequiredService<DistributedApplicationModel>(), 366await using var executor = CreateAppExecutor(app.Services.GetRequiredService<DistributedApplicationModel>()); 386app.Services.GetRequiredService<DistributedApplicationModel>(), 408var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 431var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 452var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 477var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 499var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 523var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 607var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 643var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 700var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 740var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 775var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 816var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 855var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 877var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 899var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 923var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 957var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1027var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1065var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1096var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1136var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1161var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1198var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1216var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1245var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1280var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1323var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1361var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1389var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1420var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1452var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1482var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1522var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1565var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1602var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1648var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1689var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1721var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1760var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1786var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1824var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1879var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1936var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1982var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2035var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2087var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2134var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2179var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2227var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2280var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2322var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2379var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2401var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2437var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2541var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2613var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2706var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2769var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2859var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2960var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3040var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3125var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3220var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3376var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3508app.Services.GetRequiredService<DistributedApplicationModel>(), 3576app.Services.GetRequiredService<DistributedApplicationModel>(), 3611var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3664var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3720var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3814var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 3938var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4008var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4087var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4206var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4268var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4333var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4425var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4472var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4515var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4552var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4597var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4626var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4661var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4791var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4874var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4892var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4925var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4997var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 4998var orchestrator = app.Services.GetRequiredService<Hosting.Orchestrator.ApplicationOrchestrator>(); 5049var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5084var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5131var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5173var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5221_ = app.Services.GetRequiredService<Hosting.Orchestrator.ApplicationOrchestrator>(); 5223app.Services.GetRequiredService<DistributedApplicationModel>(), 5259var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5260_ = app.Services.GetRequiredService<Hosting.Orchestrator.ApplicationOrchestrator>(); 5285var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5320var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5351var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5383await using var appExecutor = CreateAppExecutor(app.Services.GetRequiredService<DistributedApplicationModel>(), kubernetesService: kubernetesService); 5407await using var appExecutor = CreateAppExecutor(app.Services.GetRequiredService<DistributedApplicationModel>(), kubernetesService: kubernetesService); 5429await using var appExecutor = CreateAppExecutor(app.Services.GetRequiredService<DistributedApplicationModel>(), kubernetesService: kubernetesService); 5449var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5486var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5509var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5556var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 5580var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5615var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5660var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5692var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5728var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5768var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5799var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5830var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5860var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5889var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 5955var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6004var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6056var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6083var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6120var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6148var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6190var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6225var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6260var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6300var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6340var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6384var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6430var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6472var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 6514var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6551var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6569var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6630var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6667var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6722var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6773var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6822var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6916var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6949var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 6997var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7034var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7075var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7111var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7153var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7195var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7237var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7274var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7311var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7314await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 7352var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7354await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 7387var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7426var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7468var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7503var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7551var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7608var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7660var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7705var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7776var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 7880app.Services.GetRequiredService<DistributedApplicationModel>(), 8022app.Services.GetRequiredService<DistributedApplicationModel>(), 8109var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8199var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8314var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8367var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8415var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8459var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8501var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8540var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8598var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8638var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8665var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8719var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8759var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8810var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8856var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8897var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8942var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 8978var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9017var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9054var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9090var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9125var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9176var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9214var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9249var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9288var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9323var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9387var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9419var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9459var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9513var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9568var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9619var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9672var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9705var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9749var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9791var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9838var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9880var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9917var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 9961var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10037var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10111var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10173var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10232var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10268var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10305var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10405var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10439var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10489var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10524var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10565var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10604var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10649var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10695var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10748var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10801var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10840var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10868var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10902var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10946var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 10990var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11029var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11068var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11136var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11190var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11232var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11289var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11339var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11385var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11446var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11516var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11553var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11644var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11685var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11736var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11777var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11837var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11844await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 11882var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11911var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11915await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 11957var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 11961await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 12216var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Dcp\DcpHostNotificationTests.cs (8)
74var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 171var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 216var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 261var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 315var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 383var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 800var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 990return 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)
254var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 255var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 256var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 299var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 300var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 301var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 397var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 425var lifetime = app.Services.GetRequiredService<IHostApplicationLifetime>(); 458var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 459var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 612var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 613var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 614var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 699var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 700var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 701var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 853var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 910var s = app.Services.GetRequiredService<IKubernetesService>(); 967var s = app.Services.GetRequiredService<IKubernetesService>(); 1011var s = app.Services.GetRequiredService<IKubernetesService>(); 1085var s = app.Services.GetRequiredService<IKubernetesService>(); 1086var dc = app.Services.GetRequiredService<IDeveloperCertificateService>(); 1179var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 1180var s = app.Services.GetRequiredService<IKubernetesService>(); 1217var s = app.Services.GetRequiredService<IKubernetesService>(); 1218var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1257var s = app.Services.GetRequiredService<IKubernetesService>(); 1258var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1286var events = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 1293var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1294var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 1295var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1333var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1334var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 1335var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1380var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1384var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1429var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1433var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1461var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1465var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1498var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1502var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1531var dashboardServiceHost = app.Services.GetRequiredService<DashboardServiceHost>(); 1561var dashboardServiceHost = app.Services.GetRequiredService<DashboardServiceHost>(); 1594var s = app.Services.GetRequiredService<IKubernetesService>(); 1596var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1622var s = app.Services.GetRequiredService<IKubernetesService>(); 1624var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1650var s = app.Services.GetRequiredService<IKubernetesService>(); 1652var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1679var s = app.Services.GetRequiredService<IKubernetesService>(); 1681var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1708var s = app.Services.GetRequiredService<IKubernetesService>(); 1933var s = app.Services.GetRequiredService<IKubernetesService>(); 2009var s = app.Services.GetRequiredService<IKubernetesService>(); 2099var s = app.Services.GetRequiredService<IKubernetesService>(); 2140var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 2196var rns = secondRun.App.Services.GetRequiredService<ResourceNotificationService>(); 2242var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 2293var s = app.Services.GetRequiredService<IKubernetesService>(); 2295var lifecycles = app.Services.GetServices<IDistributedApplicationLifecycleHook>(); 2322var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 2323var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 2387var rns = app.Services.GetRequiredService<ResourceNotificationService>();
DotnetProgramPublishingTests.cs (12)
180var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 208var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 218app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 219app.Services, 231var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 274var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 413var manager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 459resource.Resource, metadata, buildResult, app.Services, logger, TestContext.Current.CancellationToken)); 526var pipeline = Assert.IsType<DistributedApplicationPipeline>(app.Services.GetRequiredService<IDistributedApplicationPipeline>()); 528app.Services.GetRequiredService<DistributedApplicationModel>(), 529app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 530app.Services,
Eventing\DistributedApplicationBuilderEventingTests.cs (7)
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 (66)
45var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 50[new(first.Resource, app.Services), new(second.Resource, app.Services)], 80var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 84[new(first.Resource, app.Services), new(second.Resource, app.Services)], 116var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 120await orchestrator.PublishEndpointsAllocatedAsync([new(first.Resource, app.Services)], 127await orchestrator.PublishEndpointsAllocatedAsync([new(second.Resource, app.Services)], 146var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 150await orchestrator.PublishEndpointsAllocatedAsync([new(resource.Resource, app.Services)], 154await orchestrator.PublishEndpointsAllocatedAsync([new(other.Resource, app.Services)], 186await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new(frontend.Resource, app.Services), default); 212await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new(frontend.Resource, app.Services), default); 251var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 256[new(frontend.Resource, app.Services)], builder.Eventing, dispatchBehavior, cts.Token); 311var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), notifications, 317await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 325var environment = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(backend.Resource, DistributedApplicationOperation.Run, app.Services).DefaultTimeout(); 356var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 359await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 360await orchestrator.PublishEndpointsAllocatedAsync([new(manager.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 383var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 387var publish = orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 420var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 423await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 441var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 445await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default).DefaultTimeout(); 468var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 471await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 489var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 492await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 517var orchestrator = CreateOrchestrator(app.Services.GetRequiredService<DistributedApplicationModel>(), ResourceNotificationServiceTestHelpers.Create(), 520await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 524await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 551var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 587var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 635var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 681var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 732var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 800var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 853var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 905var e = Assert.Throws<InvalidOperationException>(() => app.Services.GetService<ApplicationOrchestrator>()); 924var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 969var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1009var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1018await applicationEventing.PublishAsync(new ConnectionStringAvailableEvent(resource.Resource, app.Services), CancellationToken.None); 1019await applicationEventing.PublishAsync(new ConnectionStringAvailableEvent(resource.Resource, app.Services), CancellationToken.None); 1053var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1082var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1110var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1139var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1175var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1221var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1281var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1330var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1383var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1449var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1490var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1553var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1588var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1847var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1895var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1945var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2002var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2057var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Orchestrator\ParameterProcessorTests.cs (11)
758var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 783var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 803var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 829var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 852var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 874var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 899var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 930var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 968var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 972var parameterProcessor = app.Services.GetRequiredService<ParameterProcessor>(); 1001var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Orchestrator\RelationshipEvaluatorTests.cs (5)
49var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 81var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 104var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 127var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 150var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Pipelines\DistributedApplicationPipelineTests.cs (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>(); 1125new BeforeResourceStartedEvent(appResource.Resource, app.Services), 1147var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Publishing\ContainerRuntimeResolverTests.cs (1)
75var resolver = app.Services.GetRequiredService<IContainerRuntimeResolver>();
Publishing\DotnetProgramArchiveTests.cs (7)
324var warnings = app.Services.GetFakeLogCollector().GetSnapshot() 365ExecutionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>() 485return app.Services.GetRequiredService<IResourceContainerImageManager>().BuildImageAsync(resource, cancellationToken); 488var pipeline = Assert.IsType<DistributedApplicationPipeline>(app.Services.GetRequiredService<IDistributedApplicationPipeline>()); 490app.Services.GetRequiredService<DistributedApplicationModel>(), 491app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 492app.Services,
Publishing\PipelineExecutorTests.cs (1)
40var pipeline = app.Services.GetRequiredService<IDistributedApplicationPipeline>();
Publishing\PodmanSaveArgumentsTests.cs (1)
115new ValueProviderContext { ExecutionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>() },
Publishing\ResourceContainerImageManagerTests.cs (76)
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>(); 367var collector = app.Services.GetFakeLogCollector(); 407var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 411var collector = app.Services.GetFakeLogCollector(); 446var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 450var collector = app.Services.GetFakeLogCollector(); 480var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 484var collector = app.Services.GetFakeLogCollector(); 511var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 517var collector = app.Services.GetFakeLogCollector(); 562var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 568var collector = app.Services.GetFakeLogCollector(); 591var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 615var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 652var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 685var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 718var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 756var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 764var collector = app.Services.GetFakeLogCollector(); 795var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 818var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 859var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 864var collector = app.Services.GetFakeLogCollector(); 908var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 949var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1026var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1038ExecutionContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>() 1093var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1136var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1178var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1222var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1279var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1408var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1487var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1491var collector = app.Services.GetFakeLogCollector(); 1561var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1657var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1710var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1806var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1808app.Services, 1847var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1849app.Services, 1876var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1878app.Services, 1905var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1909app.Services, 1938var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1941app.Services, 1987var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1989app.Services, 2020var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 2022app.Services, 2055var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 2057app.Services, 2064Assert.Equal(app.Services, capturedServices); 2097var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 2147var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 2182var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 2229var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 2264var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 2300var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 2310var containerRuntime = await app.Services.GetRequiredService<IContainerRuntimeResolver>().ResolveAsync(cts.Token);
Publishing\WslcContainerRuntimeTests.cs (2)
197var manager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 230var 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)
138var subscribers = app.Services.GetServices<IDistributedApplicationEventingSubscriber>(); 152var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 154var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 156await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 168var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 170var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 173await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 186var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 188var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 191await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 211var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 213var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 214await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 238var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 240var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 241await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 262var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 264var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 267await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 283var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 285var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 288await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 303var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 306var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 309await eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 310await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services)); 335var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 338var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 340await eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 341await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services)); 370var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 373var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 375await eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 376await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services)); 395var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 397var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 400var publishTask = eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 427var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 429var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 431await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 452var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 455var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 458var publishTask1 = eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 464await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services)); 500var eventSubscribers = app.Services.GetServices<IDistributedApplicationEventingSubscriber>(); 501var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 502var execContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>();
ResourceCommandAnnotationTests.cs (2)
201Services = app.Services, 212Assert.Equal(app.Services.GetRequiredService<IHostApplicationLifetime>().ApplicationStopping, cancellationToken);
ResourceCommandServiceTests.cs (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 (3)
34logCollector = app.Services.GetFakeLogCollector(); 57logCollector = app.Services.GetFakeLogCollector(); 88var logCollector = app.Services.GetFakeLogCollector();
Terminals\ResourceTerminalCatalogTests.cs (3)
61var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 264var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 265await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
Terminals\TerminalServiceTests.cs (2)
56var service = app.Services.GetRequiredService<TerminalService>(); 796var service = app.Services.GetRequiredService<TerminalService>();
WaitForTests.cs (1)
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)
32var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 55var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 80var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 105var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 130var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 155var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
WithOtlpExporterTests.cs (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)
438app.Services.GetRequiredService<IConfiguration>(), 439app.Services.GetRequiredService<ProfilingTelemetry>(), 440app.Services); 741var 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)
109var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 610var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 635var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 666var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 697var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 778var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 1111var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 1163var rns = app.Services.GetRequiredService<ResourceNotificationService>();
WithVolumeTests.cs (15)
38app.Services); 86serviceProvider: app.Services); 90var storePrefix = Path.GetFullPath(app.Services.GetRequiredService<IAspireStore>().BasePath) + Path.DirectorySeparatorChar; 130serviceProvider: app.Services); 150var creator = app.Services.GetRequiredService<ContainerCreator>(); 167var store = app.Services.GetRequiredService<IAspireStore>(); 172serviceProvider: app.Services); 210var store = app.Services.GetRequiredService<IAspireStore>(); 219serviceProvider: app.Services); 222serviceProvider: app.Services); 243app.Services); 247app.Services); 281app.Services)); 302app.Services); 320app.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>();