Implemented interface member:
property
Services
Microsoft.Extensions.Hosting.IHost.Services
896 references to Services
Aspire.Hosting (2)
DistributedApplication.cs (1)
284/// exposes a <see cref="Services"/> property which allows developers to get services from the
DistributedApplicationBuilder.cs (1)
747_executionContextOptions.ServiceProvider = application.Services.GetRequiredService<IServiceProvider>();
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 (194)
AzureAppConfigurationExtensionsTests.cs (1)
23var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureAppServiceTests.cs (26)
39var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 68var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 101var reporter = app.Services.GetRequiredService<IPipelineActivityReporter>() as TestPipelineActivityReporter; 142var reporter = app.Services.GetRequiredService<IPipelineActivityReporter>() as TestPipelineActivityReporter; 176var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 213var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 241var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 279var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 316var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 357var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 466var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 488var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 519var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 555var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 591var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 626var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 700var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 731var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 778var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 799var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 821var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 843var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 869var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 900var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 932var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 975var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureBicepProvisionerTests.cs (2)
64var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 68var rns = app.Services.GetRequiredService<ResourceNotificationService>();
AzureBicepResourceTests.cs (1)
82var eventingServices = app.Services.GetServices<IDistributedApplicationEventingSubscriber>();
AzureContainerAppsTests.cs (63)
41var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 75var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 105var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 147var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 179var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 223var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 253var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 327var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 404var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 445var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 475var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 511var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 547var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 585var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 625var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 657var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 690var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 741var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 823var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 866var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 897var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 929var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 958var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 995var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1039var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1080var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1154var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1173var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1193var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1215var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1246var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1277var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1304var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1335var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1366var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1393var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1448var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1499var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1569var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1591var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1621var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1667var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1786var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1808var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1845var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1886var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1926var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1956var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1994var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2034var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2074var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2119var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2149var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2197var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2221var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2245var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2284var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2338var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2387var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2418var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2458var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2499var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 2546var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureContainerRegistryTests.cs (3)
29var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 51var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 87var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureCosmosDBEmulatorFunctionalTests.cs (3)
173var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 221var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 291var rns = app.Services.GetRequiredService<ResourceNotificationService>();
AzureCosmosDBExtensionsTests.cs (11)
204var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 294var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 331var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 732var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 734var beforeStartEvent = new BeforeStartEvent(app.Services, model); 764var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 766var beforeStartEvent = new BeforeStartEvent(app.Services, model); 793var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 795var beforeStartEvent = new BeforeStartEvent(app.Services, model); 823var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 825var beforeStartEvent = new BeforeStartEvent(app.Services, model);
AzureDeployerTests.cs (13)
179var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 237var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 300var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 363var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 429var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 546var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 727var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 786var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 1013var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder; 1412var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 1501var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 1533var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>(); 1596var deploymentStateManager = app.Services.GetRequiredService<IDeploymentStateManager>();
AzureEventHubsExtensionsTests.cs (4)
289var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 353var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 414var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 488var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None);
AzureFunctionsTests.cs (8)
170var model = host.Services.GetRequiredService<DistributedApplicationModel>(); 196var model = host.Services.GetRequiredService<DistributedApplicationModel>(); 319var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 352var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 380var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 409var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 440var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 761var model = host.Services.GetRequiredService<DistributedApplicationModel>();
AzureKeyVaultTests.cs (1)
36var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureKustoExtensionsTests.cs (1)
24var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureManagedRedisExtensionsTests.cs (1)
37var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureManifestUtils.cs (1)
52var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureOpenAIExtensionsTests.cs (1)
61var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzurePostgresExtensionsTests.cs (4)
38var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 61var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 383var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 413var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureProvisioningResourceTests.cs (3)
36var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 70var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 103var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureRedisExtensionsTests.cs (2)
39var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 59var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureResourcePreparerTests.cs (6)
63var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 109var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 153var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 208var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 319var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 354var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureSearchExtensionsTests.cs (1)
40var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureServiceBusExtensionsTests.cs (6)
136var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 370var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 469var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 525var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 584var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 727var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureSignalRExtensionsTests.cs (2)
21var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 43var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureStorageEmulatorFunctionalTests.cs (6)
47var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 92var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 135var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 189var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 222var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 262var rns = app.Services.GetRequiredService<ResourceNotificationService>();
AzureStorageExtensionsTests.cs (1)
637var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureUserAssignedIdentityTests.cs (7)
29var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 48var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 69var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 115var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 152var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 208var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 285var model = app.Services.GetRequiredService<DistributedApplicationModel>();
AzureWebPubSubExtensionsTests.cs (1)
287var model = app.Services.GetRequiredService<DistributedApplicationModel>();
ContainerRegistryTests.cs (4)
29var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 59var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 97var publisher = app.Services.GetRequiredKeyedService<IDistributedApplicationPublisher>("test-publisher") as ContainerRegistryValidatingPublisher; 99var model = app.Services.GetRequiredService<DistributedApplicationModel>();
ExistingAzureResourceTests.cs (1)
76var model = app.Services.GetRequiredService<DistributedApplicationModel>();
FoundryExtensionsTests.cs (5)
90var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 95var foundryManager = app.Services.GetRequiredService<FoundryLocalManager>(); 172var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 207var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 229var model = app.Services.GetRequiredService<DistributedApplicationModel>();
RoleAssignmentTests.cs (5)
236var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 265var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 295var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 323var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 347var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Containers.Tests (17)
ContainerResourceTests.cs (10)
21var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 40var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 59var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 79var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 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());
WithDockerfileTests.cs (7)
79var collector = app.Services.GetFakeLogCollector(); 209var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 241var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 469var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 539var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 927var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 968var appModel1 = app1.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Docker.Tests (2)
DockerComposePublisherTests.cs (1)
185var mockImageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>() as MockImageBuilder;
DockerComposeTests.cs (1)
826var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Foundry.Tests (2)
HostedAgentExtensionTests.cs (2)
139var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 141await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
Aspire.Hosting.Garnet.Tests (6)
AddGarnetTests.cs (6)
22var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 50var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 79var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 343var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 364var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 381var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.JavaScript.Tests (45)
AddNodeAppTests.cs (7)
246var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 273var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 303var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 481var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 508var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 525var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 546var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AddViteAppTests.cs (8)
242var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 267var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 299var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 359var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 410var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 463var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 522var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 597var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
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 (16)
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>();
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 (4)
AddKafkaTests.cs (4)
24var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 66var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 213var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 218new BeforeResourceStartedEvent(kafkaUiResource, app.Services),
Aspire.Hosting.Keycloak.Tests (3)
KeycloakPublicApiTests.cs (2)
167var entries = await containerAnnotation.Callback(new() { Model = keycloakResource, ServiceProvider = app.Services }, CancellationToken.None); 194var entries = await containerAnnotation.Callback(new() { Model = keycloakResource, ServiceProvider = app.Services }, CancellationToken.None);
KeycloakResourceBuilderTests.cs (1)
23var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Kubernetes.Tests (1)
KubernetesEnvironmentResourceTests.cs (1)
147var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Maui.Tests (2)
MauiPlatformExtensionsTests.cs (2)
249await app.Services.GetRequiredService<IDistributedApplicationEventing>() 250.PublishAsync(new BeforeResourceStartedEvent(platform.Resource, app.Services), CancellationToken.None);
Aspire.Hosting.Milvus.Tests (3)
AddMilvusTests.cs (3)
25var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 55var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 188var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.MongoDB.Tests (4)
AddMongoDBTests.cs (4)
39var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 67var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 98var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 316var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.MySql.Tests (11)
AddMySqlTests.cs (10)
44var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 83var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 121var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 140var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 244await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 272var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 275builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 364var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 380var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 385new BeforeResourceStartedEvent(phpMyAdminResource, app.Services),
MySqlFunctionalTests.cs (1)
582var rns = app.Services.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Nats.Tests (4)
AddNatsTests.cs (4)
48var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 81var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 99var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 141var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Oracle.Tests (5)
AddOracleTests.cs (5)
42var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 81var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 119var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 139var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 162var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.PostgreSQL.Tests (14)
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>(); 502var entries = await createServers.Callback(new() { Model = pgadmin, ServiceProvider = app.Services }, CancellationToken.None); 556var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 566var entries = await createBookmarks.Callback(new() { Model = pgweb, ServiceProvider = app.Services }, CancellationToken.None);
PostgresFunctionalTests.cs (1)
564var 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>();
Aspire.Hosting.Python.Tests (51)
AddPythonAppTests.cs (51)
155var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 194var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 237var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 414var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 447var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 508var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 538var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 574var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 623var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 657var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 700var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 734var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 765var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 785var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 824var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 843var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 868var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 899var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 924var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 943var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 962var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 983var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1019var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1053var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1085var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1109var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1131var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1157var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1412var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1450var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1490var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1527var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.Services); 1883var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1918var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1972var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1993var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2020var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2048var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2072var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2104var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2147var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2177var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2213var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2249var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2278var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2310var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2340var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2373var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2400var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2401var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 2402await 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>(); 326var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.RabbitMQ.Tests (3)
AddRabbitMQTests.cs (3)
50var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 102var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 141var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Redis.Tests (26)
AddRedisTests.cs (21)
37var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 65var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 96var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 115var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 132var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 149var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 174var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 203var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 229var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 458var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 489await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 515await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 536await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 688var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 714var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 809var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 812var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 861var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 864var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 889var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 892var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
RedisFunctionalTests.cs (5)
151var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 488var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 523var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 624var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 634var clientFactory = app.Services.GetRequiredService<IHttpClientFactory>();
Aspire.Hosting.Seq.Tests (6)
AddSeqTests.cs (6)
21var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 49var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 78var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 175var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 208var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 238var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.SqlServer.Tests (4)
AddSqlServerTests.cs (4)
43var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 90var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 112var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 276var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Testing (6)
DistributedApplicationFactory.cs (2)
172_shutdownTimeout = application.Services.GetService<IOptions<HostOptions>>()?.Value.ShutdownTimeout ?? _shutdownTimeout; 428_hostApplicationLifetime = app.Services.GetService<IHostApplicationLifetime>()
DistributedApplicationHostingTestingExtensions.cs (3)
30var clientFactory = app.Services.GetRequiredService<IHttpClientFactory>(); 131var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 172var lifetime = app.Services.GetRequiredService<IHostApplicationLifetime>();
DistributedApplicationTestingBuilder.cs (1)
300public IServiceProvider Services => innerApp.Services;
Aspire.Hosting.Testing.Tests (11)
TestingBuilderTests.cs (4)
105var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 167var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 408var hostEnvironment = app.Services.GetRequiredService<IHostEnvironment>(); 424var config = app.Services.GetRequiredService<IConfiguration>();
TestingFactoryTests.cs (3)
43var appModel = _app.Services.GetRequiredService<DistributedApplicationModel>(); 65var appModel = _app.Services.GetRequiredService<IHostEnvironment>(); 74var config = _app.Services.GetRequiredService<IConfiguration>();
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (4)
35var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 78var hostApplicationLifetime = app.Services.GetRequiredService<IHostApplicationLifetime>(); 124var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 125var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
Aspire.Hosting.Tests (433)
AddConnectionStringTests.cs (2)
27var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 56var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AddParameterTests.cs (11)
26var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 58var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 94var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 146var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 205var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 274var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 306var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 521var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 545var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 568var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 594var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
AppHostSmokeTests.cs (1)
92var dcpOptions = host.Services.GetRequiredService<IOptions<DcpOptions>>();
AspireStoreTests.cs (3)
38var store = app.Services.GetRequiredService<IAspireStore>(); 62var store = app.Services.GetRequiredService<IAspireStore>(); 139return app.Services.GetRequiredService<IAspireStore>();
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (13)
48var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 60app.Services); 93var notificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 133app.Services); 220var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 231app.Services); 259app.Services); 283var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 298app.Services); 332var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 347app.Services); 374var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 381app.Services);
Backchannel\AuxiliaryBackchannelTests.cs (16)
38var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 78var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 120var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 155var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 196var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 240var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 286var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 317var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 358var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 395var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 415var lifetime = app.Services.GetService<IHostApplicationLifetime>(); 444var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 482var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 525var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 568var service = app.Services.GetRequiredService<AuxiliaryBackchannelService>(); 591var collector = app.Services.GetFakeLogCollector();
Backchannel\Exec\ExecTestsBase.cs (1)
28var appHostRpcTarget = app.Services.GetRequiredService<AppHostRpcTarget>();
Codespaces\CodespacesUrlRewriterTests.cs (1)
35var collector = app.Services.GetFakeLogCollector();
ContainerRegistryResourceTests.cs (29)
140var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 155var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 171var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 187var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 291var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 516var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 522var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 540var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 543var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 564var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 567var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 586var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 589var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 609var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 612var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 645var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 648var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 669var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 672var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 696var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 702var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 720var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 723var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 740var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 743var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 761var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 764var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 782var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 785var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
Dashboard\DashboardOptionsTests.cs (1)
32var dashboardOptions = app.Services.GetRequiredService<IOptions<DashboardOptions>>().Value;
Dashboard\DashboardResourceTests.cs (21)
48var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 75var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 109var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 226var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 260var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 301var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 340var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 376var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 414var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 425var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.Services).DefaultTimeout(); 460var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 466var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.Services).DefaultTimeout(); 493var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 514var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 530var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 581var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 595var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 596var resourceNotificationService = app.Services.GetRequiredService<ResourceNotificationService>(); 647var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 692var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 707app.Services.GetRequiredService<DistributedApplicationExecutionContext>(),
Dcp\DcpCliArgsTests.cs (1)
55var dcpOptions = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value;
Dcp\DcpExecutorTests.cs (59)
40var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 65var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 149var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 184var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 227var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 276var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 308var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 340var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 373var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 410var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 430var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 464var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 498var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 562var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 584var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 620var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 724var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 804var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 898var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 943var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 980var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1015var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1075var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1096var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1132var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1169var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1206var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1236var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1273var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1296var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1334var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1374var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1398var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1433var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1466var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1502var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1542var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1573var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1604var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1634var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1663var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1711var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1761var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1798var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1839var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1875var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1917var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 1959var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2001var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2038var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2075var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2118var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2148var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2198var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2239var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2370var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2417var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2472var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 2521var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Dcp\DcpHostNotificationTests.cs (6)
70var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 171var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 232var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 293var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 349var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 423var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>();
DistributedApplicationBuilderTests.cs (9)
50var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 53var eventingSubscribers = app.Services.GetServices<IDistributedApplicationEventingSubscriber>(); 61var options = app.Services.GetRequiredService<IOptions<PipelineOptions>>(); 72var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 83var pipelineOptions = app.Services.GetRequiredService<IOptions<PipelineOptions>>(); 94var pipelineOptions = app.Services.GetRequiredService<IOptions<PipelineOptions>>(); 105var config = app.Services.GetRequiredService<IConfiguration>(); 115var config = app.Services.GetRequiredService<IConfiguration>(); 215var config = app.Services.GetRequiredService<IConfiguration>();
DistributedApplicationModelExtensionsTests.cs (2)
27var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 62var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
DistributedApplicationTests.cs (60)
136var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 137var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 138var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 181var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 182var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 183var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 273var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 316var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 317var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 390var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 391var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 392var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 469var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 470var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 471var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 631var logger = app.Services.GetRequiredService<ILogger<DistributedApplicationTests>>(); 688var s = app.Services.GetRequiredService<IKubernetesService>(); 745var s = app.Services.GetRequiredService<IKubernetesService>(); 789var s = app.Services.GetRequiredService<IKubernetesService>(); 863var s = app.Services.GetRequiredService<IKubernetesService>(); 864var dc = app.Services.GetRequiredService<IDeveloperCertificateService>(); 957var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 958var s = app.Services.GetRequiredService<IKubernetesService>(); 995var s = app.Services.GetRequiredService<IKubernetesService>(); 996var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1035var s = app.Services.GetRequiredService<IKubernetesService>(); 1036var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1064var events = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 1071var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1072var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 1073var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1111var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1112var orchestrator = app.Services.GetRequiredService<ApplicationOrchestrator>(); 1113var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1155var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1159var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1204var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1208var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 1236var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1240var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1273var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1277var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1307var s = app.Services.GetRequiredService<IKubernetesService>(); 1309var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1335var s = app.Services.GetRequiredService<IKubernetesService>(); 1337var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1363var s = app.Services.GetRequiredService<IKubernetesService>(); 1365var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1392var s = app.Services.GetRequiredService<IKubernetesService>(); 1394var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1417var s = app.Services.GetRequiredService<IKubernetesService>(); 1476var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1494var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix; 1638var s = app.Services.GetRequiredService<IKubernetesService>(); 1707var s = app.Services.GetRequiredService<IKubernetesService>(); 1792var s = app.Services.GetRequiredService<IKubernetesService>(); 1819var s = app.Services.GetRequiredService<IKubernetesService>(); 1821var lifecycles = app.Services.GetServices<IDistributedApplicationLifecycleHook>(); 1847var kubernetes = app.Services.GetRequiredService<IKubernetesService>(); 1848var suffix = app.Services.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
Eventing\DistributedApplicationBuilderEventingTests.cs (3)
169var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 294var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 303var testEvent = new ResourceStoppedEvent(resource.Resource, app.Services, testResourceEvent);
ExternalServiceTests.cs (4)
173var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, DistributedApplicationOperation.Publish, app.Services).DefaultTimeout(); 405var healthCheckService = app.Services.GetService<HealthCheckService>(); 426var healthCheckService = app.Services.GetService<HealthCheckService>(); 443var healthCheckService = app.Services.GetRequiredService<HealthCheckService>();
Health\ResourceHealthCheckServiceTests.cs (6)
159var healthService = app.Services.GetRequiredService<ResourceHealthCheckService>(); 222var logger = app.Services.GetRequiredService<ILogger<ResourceHealthCheckServiceTests>>(); 223var rhcs = app.Services.GetRequiredService<ResourceHealthCheckService>(); 262var logger = app.Services.GetRequiredService<ILogger<ResourceHealthCheckServiceTests>>(); 263var rhcs = app.Services.GetRequiredService<ResourceHealthCheckService>(); 483var rhcs = app.Services.GetRequiredService<ResourceHealthCheckService>();
HealthCheckTests.cs (2)
102var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 139var collector = app.Services.GetFakeLogCollector();
KestrelConfigTests.cs (1)
354var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Orchestrator\ApplicationOrchestratorTests.cs (15)
38var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 86var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 132var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 183var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 251var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 304var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 356var e = Assert.Throws<InvalidOperationException>(() => app.Services.GetService<ApplicationOrchestrator>()); 375var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 420var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 449await applicationEventing.PublishAsync(new ConnectionStringAvailableEvent(resource.Resource, app.Services), CancellationToken.None); 610var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 657var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 706var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 763var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 818var distributedAppModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Orchestrator\ParameterProcessorTests.cs (11)
586var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 611var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 631var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 657var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 680var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 702var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 727var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 758var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 796var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 800var parameterProcessor = app.Services.GetRequiredService<ParameterProcessor>(); 829var model = app.Services.GetRequiredService<DistributedApplicationModel>();
Orchestrator\RelationshipEvaluatorTests.cs (5)
29var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 61var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 84var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 107var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 130var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Pipelines\DistributedApplicationPipelineTests.cs (4)
939app.Services.GetRequiredService<DistributedApplicationModel>(), 940app.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 941app.Services, 942app.Services.GetRequiredService<ILogger<DistributedApplicationPipelineTests>>(),
ProjectResourceTests.cs (23)
129var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 238var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 265var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 283var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 299var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 349var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 369var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 412var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 434var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 459var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 489var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 508var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 532var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 580var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 680var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 711var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 729var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 747var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 766var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 784var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 829var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 862var fakeContainerRuntime = (FakeContainerRuntime)app.Services.GetRequiredService<IContainerRuntime>(); 877var mockImageBuilder = (MockImageBuilder)app.Services.GetRequiredService<IResourceContainerImageManager>();
Publishing\ResourceContainerImageManagerTests.cs (56)
38var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 42var collector = app.Services.GetFakeLogCollector(); 70var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 74var collector = app.Services.GetFakeLogCollector(); 101var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 105var collector = app.Services.GetFakeLogCollector(); 138var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 142var collector = app.Services.GetFakeLogCollector(); 172var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 176var collector = app.Services.GetFakeLogCollector(); 202var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 206var collector = app.Services.GetFakeLogCollector(); 238var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 242var collector = app.Services.GetFakeLogCollector(); 277var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 281var collector = app.Services.GetFakeLogCollector(); 312var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 316var collector = app.Services.GetFakeLogCollector(); 344var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 348var collector = app.Services.GetFakeLogCollector(); 373var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 379var collector = app.Services.GetFakeLogCollector(); 423var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 429var collector = app.Services.GetFakeLogCollector(); 452var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 476var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 511var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 542var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 574var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 610var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 618var collector = app.Services.GetFakeLogCollector(); 657var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 661var collector = app.Services.GetFakeLogCollector(); 730var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 825var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 877var imageBuilder = app.Services.GetRequiredService<IResourceContainerImageManager>(); 971var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 973app.Services, 1010var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1012app.Services, 1037var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1039app.Services, 1064var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1066app.Services, 1113var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1115app.Services, 1144var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1146app.Services, 1177var logger = app.Services.GetRequiredService<ILogger<ResourceContainerImageBuilderTests>>(); 1179app.Services, 1186Assert.Equal(app.Services, capturedServices); 1217var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1265var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1298var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1341var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>(); 1374var imageManager = app.Services.GetRequiredService<IResourceContainerImageManager>();
RequiredCommandAnnotationTests.cs (43)
139var subscribers = app.Services.GetServices<IDistributedApplicationEventingSubscriber>(); 153var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 155var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 157await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 169var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 171var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 174await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 187var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 189var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 192await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 212var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 214var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 215await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 239var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 241var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 242await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 263var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 265var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 268await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 284var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 286var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 289await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 304var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 307var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 310await eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 311await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services)); 338var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 341var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 343await eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 344await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services)); 363var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 365var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 368var publishTask = eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 395var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 397var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 399await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 420var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 423var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 426var publishTask1 = eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 432await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services)); 444var eventSubscribers = app.Services.GetServices<IDistributedApplicationEventingSubscriber>(); 445var eventing = app.Services.GetRequiredService<IDistributedApplicationEventing>(); 446var execContext = app.Services.GetRequiredService<DistributedApplicationExecutionContext>();
Utils\LoggerNotificationExtensions.cs (4)
35var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 78var hostApplicationLifetime = app.Services.GetRequiredService<IHostApplicationLifetime>(); 124var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 125var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
WaitForTests.cs (1)
576var collector = app.Services.GetFakeLogCollector();
WithEndpointTests.cs (1)
210var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
WithEnvironmentTests.cs (1)
30var serviceProvider = app.Services.GetRequiredService<IServiceProvider>();
WithHttpCommandTests.cs (1)
33var 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 (3)
42var serviceProvider = app.Services.GetRequiredService<IServiceProvider>(); 65var serviceProvider = app.Services.GetRequiredService<IServiceProvider>(); 87var serviceProvider = app.Services.GetRequiredService<IServiceProvider>();
WithUrlsTests.cs (7)
380var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 407var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 440var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 469var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 587var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 670var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 973var rns = app.Services.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Valkey.Tests (6)
AddValkeyTests.cs (6)
22var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 50var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 79var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 98var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 115var appModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 333var appModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Yarp.Tests (8)
AddYarpTests.cs (8)
290Services = app.Services, 321Services = app.Services, 353Services = app.Services, 391Services = app.Services, 418var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 420var beforeStartEvent = new BeforeStartEvent(app.Services, model); 443var model = app.Services.GetRequiredService<DistributedApplicationModel>(); 445var beforeStartEvent = new BeforeStartEvent(app.Services, model);
Aspire.Playground.Tests (11)
AppHostTests.cs (1)
68var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>();
Infrastructure\DistributedApplicationExtensions.cs (6)
105var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 115var environment = app.Services.GetRequiredService<IHostEnvironment>(); 116var logCollector = app.Services.GetFakeLogCollector(); 133var environment = app.Services.GetRequiredService<IHostEnvironment>(); 134var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>(); 213var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(TryApplyEfMigrationsAsync));
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (4)
35var rns = app.Services.GetRequiredService<ResourceNotificationService>(); 78var hostApplicationLifetime = app.Services.GetRequiredService<IHostApplicationLifetime>(); 124var resourceLoggerService = app.Services.GetRequiredService<ResourceLoggerService>(); 125var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
TestingAppHost1.AppHost (1)
Program.cs (1)
64var notifications = app.Services.GetRequiredService<ResourceNotificationService>();