Implemented interface member:
property
Services
Microsoft.Extensions.Hosting.IHost.Services
673 references to Services
Aspire.Hosting (2)
DistributedApplication.cs (1)
235
/// exposes a <see cref="
Services
"/> property which allows developers to get services from the
DistributedApplicationBuilder.cs (1)
694
_executionContextOptions.ServiceProvider = application.
Services
.GetRequiredService<IServiceProvider>();
Aspire.Hosting.Azure.Kusto.Tests (7)
KustoFunctionalTests.cs (7)
55
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
106
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
185
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
189
var snapshot = app.
Services
.GetRequiredService<FakeLogCollector>().GetSnapshot();
212
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
220
var snapshot = app.
Services
.GetRequiredService<FakeLogCollector>().GetSnapshot();
251
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Azure.Tests (160)
AzureAIFoundryExtensionsTests.cs (3)
89
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
94
var foundryManager = app.
Services
.GetRequiredService<FoundryLocalManager>();
171
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureAppConfigurationExtensionsTests.cs (1)
23
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureAppServiceTests.cs (22)
37
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
66
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
100
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
137
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
165
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
203
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
240
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
281
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
390
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
412
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
443
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
468
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
500
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
536
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
571
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
625
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
656
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
703
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
724
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
746
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
768
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
794
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureBicepProvisionerTests.cs (2)
63
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
67
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
AzureBicepResourceTests.cs (1)
83
var eventingServices = app.
Services
.GetServices<IDistributedApplicationEventingSubscriber>();
AzureContainerAppsTests.cs (51)
38
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
72
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
102
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
144
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
176
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
220
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
250
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
324
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
401
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
442
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
472
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
508
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
544
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
582
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
622
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
654
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
687
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
738
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
820
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
863
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
894
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
926
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
955
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
992
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1036
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1077
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1115
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1136
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1155
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1175
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1194
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1213
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1231
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1262
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1318
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1369
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1439
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1461
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1491
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1537
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1656
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1678
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1715
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1756
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1796
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1826
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1864
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1904
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1944
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1989
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2019
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureContainerRegistryTests.cs (3)
26
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
48
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
84
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureCosmosDBEmulatorFunctionalTests.cs (3)
172
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
220
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
289
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
AzureCosmosDBExtensionsTests.cs (3)
202
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
296
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
333
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureDeployerTests.cs (12)
161
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
202
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
251
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
300
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
358
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
464
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
642
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
687
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
898
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
1171
var deploymentStateManager = app.
Services
.GetRequiredService<IDeploymentStateManager>();
1260
var deploymentStateManager = app.
Services
.GetRequiredService<IDeploymentStateManager>();
1292
var deploymentStateManager = app.
Services
.GetRequiredService<IDeploymentStateManager>();
AzureEventHubsExtensionsTests.cs (4)
289
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
353
var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, ServiceProvider = app.
Services
}, CancellationToken.None);
414
var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, ServiceProvider = app.
Services
}, CancellationToken.None);
488
var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, ServiceProvider = app.
Services
}, CancellationToken.None);
AzureFunctionsTests.cs (8)
160
var model = host.
Services
.GetRequiredService<DistributedApplicationModel>();
186
var model = host.
Services
.GetRequiredService<DistributedApplicationModel>();
285
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
318
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
346
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
375
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
406
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
728
var model = host.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureKeyVaultTests.cs (1)
35
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureKustoExtensionsTests.cs (1)
24
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureOpenAIExtensionsTests.cs (1)
60
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzurePostgresExtensionsTests.cs (2)
36
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
59
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureProvisioningResourceTests.cs (3)
36
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
70
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
103
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureRedisEnterpriseExtensionsTests.cs (1)
39
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureRedisExtensionsTests.cs (2)
38
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
58
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureResourcePreparerTests.cs (3)
61
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
107
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
151
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureSearchExtensionsTests.cs (1)
40
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureServiceBusExtensionsTests.cs (6)
135
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
369
var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.
Services
}, CancellationToken.None);
468
var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.
Services
}, CancellationToken.None);
525
var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.
Services
}, CancellationToken.None);
584
var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.
Services
}, CancellationToken.None);
727
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureSignalRExtensionsTests.cs (2)
21
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
43
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureStorageEmulatorFunctionalTests.cs (6)
47
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
92
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
135
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
188
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
222
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
261
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
AzureStorageExtensionsTests.cs (1)
635
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureUserAssignedIdentityTests.cs (7)
29
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
48
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
69
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
114
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
151
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
206
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
282
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureWebPubSubExtensionsTests.cs (1)
287
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
ContainerRegistryTests.cs (4)
29
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
59
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
97
var publisher = app.
Services
.GetRequiredKeyedService<IDistributedApplicationPublisher>("test-publisher") as ContainerRegistryValidatingPublisher;
99
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
ExistingAzureResourceTests.cs (1)
78
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
RoleAssignmentTests.cs (4)
237
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
266
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
296
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
318
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Containers.Tests (17)
ContainerResourceTests.cs (10)
21
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
40
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
59
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
79
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
180
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
214
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
242
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
261
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
310
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
357
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
WithDockerfileTests.cs (7)
81
var collector = app.
Services
.GetFakeLogCollector();
212
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
245
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
474
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
545
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
928
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
965
var appModel1 = app1.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Docker.Tests (1)
DockerComposePublisherTests.cs (1)
181
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
Aspire.Hosting.Garnet.Tests (6)
AddGarnetTests.cs (6)
22
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
50
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
79
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
343
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
364
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
381
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.JavaScript.Tests (31)
AddNodeAppTests.cs (3)
237
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
264
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
294
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AddViteAppWithPnpmTests.cs (3)
21
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
55
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
86
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
IntegrationTests.cs (2)
25
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
67
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
PackageInstallationTests.cs (16)
32
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
59
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
83
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
122
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
149
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
188
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
214
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
238
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
259
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
283
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
310
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
338
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
365
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
387
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
409
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
429
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
ResourceCreationTests.cs (7)
20
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
38
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
56
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
76
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
99
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
136
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
171
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Kafka.Tests (4)
AddKafkaTests.cs (4)
23
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
65
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
212
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
217
new BeforeResourceStartedEvent(kafkaUiResource, app.
Services
),
Aspire.Hosting.Keycloak.Tests (3)
KeycloakPublicApiTests.cs (2)
167
var entries = await containerAnnotation.Callback(new() { Model = keycloakResource, ServiceProvider = app.
Services
}, CancellationToken.None);
194
var entries = await containerAnnotation.Callback(new() { Model = keycloakResource, ServiceProvider = app.
Services
}, CancellationToken.None);
KeycloakResourceBuilderTests.cs (1)
23
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Maui.Tests (2)
MauiPlatformExtensionsTests.cs (2)
249
await app.
Services
.GetRequiredService<IDistributedApplicationEventing>()
250
.PublishAsync(new BeforeResourceStartedEvent(platform.Resource, app.
Services
), CancellationToken.None);
Aspire.Hosting.Milvus.Tests (3)
AddMilvusTests.cs (3)
25
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
55
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
184
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.MongoDB.Tests (4)
AddMongoDBTests.cs (4)
23
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
51
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
82
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
300
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.MySql.Tests (11)
AddMySqlTests.cs (10)
44
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
83
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
121
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
140
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
244
await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.
Services
));
272
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
275
builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.
Services
));
364
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
380
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
385
new BeforeResourceStartedEvent(phpMyAdminResource, app.
Services
),
MySqlFunctionalTests.cs (1)
578
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Nats.Tests (4)
AddNatsTests.cs (4)
48
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
81
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
99
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
141
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Oracle.Tests (5)
AddOracleTests.cs (5)
42
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
81
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
119
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
139
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
162
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.PostgreSQL.Tests (9)
AddPostgresTests.cs (8)
52
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
106
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
176
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
198
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
379
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
478
var entries = await createServers.Callback(new() { Model = pgadmin, ServiceProvider = app.
Services
}, CancellationToken.None);
532
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
542
var entries = await createBookmarks.Callback(new() { Model = pgweb, ServiceProvider = app.
Services
}, CancellationToken.None);
PostgresFunctionalTests.cs (1)
562
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Python.Tests (48)
AddPythonAppTests.cs (48)
155
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
194
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
237
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
414
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
447
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
508
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
538
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
571
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
616
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
650
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
689
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
723
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
754
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
774
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
813
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
834
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
865
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
890
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
909
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
928
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
949
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
985
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1019
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1051
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1075
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1097
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1123
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1378
var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.
Services
);
1416
var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.
Services
);
1456
var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.
Services
);
1493
var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.
Services
);
1849
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1884
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1938
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1959
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1986
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2014
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2038
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2070
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2113
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2143
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2179
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2215
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2244
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2276
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2297
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2298
var eventing = app.
Services
.GetRequiredService<IDistributedApplicationEventing>();
2299
await eventing.PublishAsync(new BeforeStartEvent(app.
Services
, appModel), CancellationToken.None);
Aspire.Hosting.Qdrant.Tests (4)
AddQdrantTests.cs (4)
45
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
84
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
117
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
283
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.RabbitMQ.Tests (3)
AddRabbitMQTests.cs (3)
50
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
102
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
141
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Redis.Tests (20)
AddRedisTests.cs (15)
35
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
63
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
94
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
111
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
126
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
472
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
501
await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.
Services
));
527
await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.
Services
));
548
await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.
Services
));
700
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
720
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
815
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
818
var beforeStartEvent = new BeforeStartEvent(app.
Services
, appModel);
832
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
835
var beforeStartEvent = new BeforeStartEvent(app.
Services
, appModel);
RedisFunctionalTests.cs (5)
150
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
482
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
517
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
618
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
628
var clientFactory = app.
Services
.GetRequiredService<IHttpClientFactory>();
Aspire.Hosting.Seq.Tests (6)
AddSeqTests.cs (6)
21
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
49
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
78
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
175
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
208
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
238
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.SqlServer.Tests (4)
AddSqlServerTests.cs (4)
43
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
90
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
112
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
276
var 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)
28
var clientFactory = app.
Services
.GetRequiredService<IHttpClientFactory>();
95
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
136
var lifetime = app.
Services
.GetRequiredService<IHostApplicationLifetime>();
DistributedApplicationTestingBuilder.cs (1)
296
public IServiceProvider Services => innerApp.
Services
;
Aspire.Hosting.Testing.Tests (11)
TestingBuilderTests.cs (4)
105
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
167
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
404
var hostEnvironment = app.
Services
.GetRequiredService<IHostEnvironment>();
420
var config = app.
Services
.GetRequiredService<IConfiguration>();
TestingFactoryTests.cs (3)
43
var appModel = _app.
Services
.GetRequiredService<DistributedApplicationModel>();
65
var appModel = _app.
Services
.GetRequiredService<IHostEnvironment>();
74
var config = _app.
Services
.GetRequiredService<IConfiguration>();
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (4)
35
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
78
var hostApplicationLifetime = app.
Services
.GetRequiredService<IHostApplicationLifetime>();
124
var resourceLoggerService = app.
Services
.GetRequiredService<ResourceLoggerService>();
125
var logger = app.
Services
.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
Aspire.Hosting.Tests (280)
AddConnectionStringTests.cs (2)
26
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
55
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AddParameterTests.cs (11)
25
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
57
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
93
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
145
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
204
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
273
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
305
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
520
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
544
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
567
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
593
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AppHostSmokeTests.cs (1)
93
var dcpOptions = host.
Services
.GetRequiredService<IOptions<DcpOptions>>();
AspireStoreTests.cs (3)
36
var store = app.
Services
.GetRequiredService<IAspireStore>();
60
var store = app.
Services
.GetRequiredService<IAspireStore>();
134
return app.
Services
.GetRequiredService<IAspireStore>();
Backchannel\Exec\ExecTestsBase.cs (1)
28
var appHostRpcTarget = app.
Services
.GetRequiredService<AppHostRpcTarget>();
Codespaces\CodespacesUrlRewriterTests.cs (1)
34
var collector = app.
Services
.GetFakeLogCollector();
Dashboard\DashboardOptionsTests.cs (1)
31
var dashboardOptions = app.
Services
.GetRequiredService<IOptions<DashboardOptions>>().Value;
Dashboard\DashboardResourceTests.cs (18)
45
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
73
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
107
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
209
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
243
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
284
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
323
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
359
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
397
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
408
var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.
Services
).DefaultTimeout();
443
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
449
var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.
Services
).DefaultTimeout();
470
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
486
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
537
var resourceLoggerService = app.
Services
.GetRequiredService<ResourceLoggerService>();
551
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
552
var resourceNotificationService = app.
Services
.GetRequiredService<ResourceNotificationService>();
603
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Dcp\DcpCliArgsTests.cs (1)
54
var dcpOptions = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value;
Dcp\DcpExecutorTests.cs (49)
39
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
64
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
148
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
190
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
239
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
271
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
303
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
336
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
373
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
393
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
427
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
461
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
525
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
547
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
583
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
687
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
797
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
842
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
879
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
914
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
974
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
995
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1031
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1068
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1105
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1135
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1172
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1194
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1229
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1269
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1293
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1328
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1364
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1404
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1435
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1466
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1496
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1525
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1573
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1623
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1660
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1701
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1737
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1779
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1821
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1863
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1900
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1937
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1980
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Dcp\DcpHostNotificationTests.cs (6)
49
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
98
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
153
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
208
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
258
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
326
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
DistributedApplicationBuilderTests.cs (9)
41
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
44
var eventingSubscribers = app.
Services
.GetServices<IDistributedApplicationEventingSubscriber>();
51
var options = app.
Services
.GetRequiredService<IOptions<PipelineOptions>>();
62
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
73
var pipelineOptions = app.
Services
.GetRequiredService<IOptions<PipelineOptions>>();
84
var pipelineOptions = app.
Services
.GetRequiredService<IOptions<PipelineOptions>>();
95
var config = app.
Services
.GetRequiredService<IConfiguration>();
105
var config = app.
Services
.GetRequiredService<IConfiguration>();
118
var config = app.
Services
.GetRequiredService<IConfiguration>();
DistributedApplicationModelExtensionsTests.cs (1)
26
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
DistributedApplicationTests.cs (51)
135
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
136
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
137
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
178
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
179
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
180
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
253
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
254
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
255
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
330
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
331
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
332
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
490
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
548
var s = app.
Services
.GetRequiredService<IKubernetesService>();
606
var s = app.
Services
.GetRequiredService<IKubernetesService>();
653
var s = app.
Services
.GetRequiredService<IKubernetesService>();
769
var s = app.
Services
.GetRequiredService<IKubernetesService>();
771
var dc = app.
Services
.GetRequiredService<IDeveloperCertificateService>();
904
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
905
var s = app.
Services
.GetRequiredService<IKubernetesService>();
928
var events = app.
Services
.GetRequiredService<IDistributedApplicationEventing>();
935
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
936
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
937
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
978
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
979
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
980
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1022
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
1026
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1073
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
1077
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1107
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
1111
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1147
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
1151
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1182
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1184
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1211
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1213
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1240
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1242
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1270
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1272
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1296
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1356
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1375
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1517
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1588
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1673
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1700
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1702
var lifecycles = app.
Services
.GetServices<IDistributedApplicationLifecycleHook>();
Eventing\DistributedApplicationBuilderEventingTests.cs (3)
168
var eventing = app.
Services
.GetRequiredService<IDistributedApplicationEventing>();
293
var eventing = app.
Services
.GetRequiredService<IDistributedApplicationEventing>();
302
var testEvent = new ResourceStoppedEvent(resource.Resource, app.
Services
, testResourceEvent);
ExternalServiceTests.cs (4)
167
var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, DistributedApplicationOperation.Publish, app.
Services
).DefaultTimeout();
382
var healthCheckService = app.
Services
.GetService<HealthCheckService>();
403
var healthCheckService = app.
Services
.GetService<HealthCheckService>();
420
var healthCheckService = app.
Services
.GetRequiredService<HealthCheckService>();
Health\ResourceHealthCheckServiceTests.cs (6)
158
var healthService = app.
Services
.GetRequiredService<ResourceHealthCheckService>();
221
var logger = app.
Services
.GetRequiredService<ILogger<ResourceHealthCheckServiceTests>>();
222
var rhcs = app.
Services
.GetRequiredService<ResourceHealthCheckService>();
261
var logger = app.
Services
.GetRequiredService<ILogger<ResourceHealthCheckServiceTests>>();
262
var rhcs = app.
Services
.GetRequiredService<ResourceHealthCheckService>();
482
var rhcs = app.
Services
.GetRequiredService<ResourceHealthCheckService>();
HealthCheckTests.cs (2)
101
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
139
var collector = app.
Services
.GetFakeLogCollector();
KestrelConfigTests.cs (1)
359
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Orchestrator\ApplicationOrchestratorTests.cs (15)
34
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
81
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
126
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
176
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
243
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
295
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
347
var e = Assert.Throws<InvalidOperationException>(() => app.
Services
.GetService<ApplicationOrchestrator>());
365
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
409
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
438
await applicationEventing.PublishAsync(new ConnectionStringAvailableEvent(resource.Resource, app.
Services
), CancellationToken.None);
588
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
634
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
682
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
738
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
792
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Orchestrator\ParameterProcessorTests.cs (11)
493
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
518
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
538
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
564
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
587
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
609
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
634
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
665
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
703
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
707
var parameterProcessor = app.
Services
.GetRequiredService<ParameterProcessor>();
736
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Orchestrator\RelationshipEvaluatorTests.cs (5)
28
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
60
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
83
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
106
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
129
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Pipelines\DistributedApplicationPipelineTests.cs (3)
875
app.
Services
.GetRequiredService<DistributedApplicationModel>(),
876
app.
Services
.GetRequiredService<DistributedApplicationExecutionContext>(),
877
app.
Services
,
ProjectResourceTests.cs (23)
81
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
200
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
227
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
245
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
261
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
311
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
331
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
374
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
396
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
421
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
451
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
470
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
494
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
544
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
646
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
677
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
695
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
713
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
732
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
750
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
792
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
826
var fakeContainerRuntime = (FakeContainerRuntime)app.
Services
.GetRequiredService<IContainerRuntime>();
841
var mockImageBuilder = (MockImageBuilder)app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
Publishing\ResourceContainerImageBuilderTests.cs (37)
36
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
40
var collector = app.
Services
.GetFakeLogCollector();
68
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
72
var collector = app.
Services
.GetFakeLogCollector();
100
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
104
var collector = app.
Services
.GetFakeLogCollector();
138
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
142
var collector = app.
Services
.GetFakeLogCollector();
176
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
180
var collector = app.
Services
.GetFakeLogCollector();
210
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
214
var collector = app.
Services
.GetFakeLogCollector();
248
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
252
var collector = app.
Services
.GetFakeLogCollector();
289
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
293
var collector = app.
Services
.GetFakeLogCollector();
328
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
332
var collector = app.
Services
.GetFakeLogCollector();
364
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
368
var collector = app.
Services
.GetFakeLogCollector();
393
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
399
var collector = app.
Services
.GetFakeLogCollector();
444
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
450
var collector = app.
Services
.GetFakeLogCollector();
471
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
497
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
519
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
540
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
570
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
602
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
634
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
671
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
678
var collector = app.
Services
.GetFakeLogCollector();
717
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
721
var collector = app.
Services
.GetFakeLogCollector();
789
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
884
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
Utils\LoggerNotificationExtensions.cs (4)
35
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
78
var hostApplicationLifetime = app.
Services
.GetRequiredService<IHostApplicationLifetime>();
124
var resourceLoggerService = app.
Services
.GetRequiredService<ResourceLoggerService>();
125
var logger = app.
Services
.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
WaitForTests.cs (1)
576
var collector = app.
Services
.GetFakeLogCollector();
WithEndpointTests.cs (1)
209
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
WithEnvironmentTests.cs (1)
29
var serviceProvider = app.
Services
.GetRequiredService<IServiceProvider>();
WithHttpCommandTests.cs (1)
30
var httpClientFactory = app.
Services
.GetService<IHttpClientFactory>();
WithOtlpExporterTests.cs (2)
40
var serviceProvider = app.
Services
.GetRequiredService<IServiceProvider>();
63
var serviceProvider = app.
Services
.GetRequiredService<IServiceProvider>();
WithUrlsTests.cs (5)
380
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
416
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
459
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
544
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
670
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Valkey.Tests (6)
AddValkeyTests.cs (6)
22
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
50
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
79
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
98
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
115
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
333
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Yarp.Tests (4)
AddYarpTests.cs (4)
289
Services = app.
Services
,
320
Services = app.
Services
,
352
Services = app.
Services
,
390
Services = app.
Services
,
Aspire.Playground.Tests (11)
AppHostTests.cs (1)
68
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Infrastructure\DistributedApplicationExtensions.cs (6)
105
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
115
var environment = app.
Services
.GetRequiredService<IHostEnvironment>();
116
var logCollector = app.
Services
.GetFakeLogCollector();
133
var environment = app.
Services
.GetRequiredService<IHostEnvironment>();
134
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
213
var logger = app.
Services
.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(TryApplyEfMigrationsAsync));
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (4)
35
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
78
var hostApplicationLifetime = app.
Services
.GetRequiredService<IHostApplicationLifetime>();
124
var resourceLoggerService = app.
Services
.GetRequiredService<ResourceLoggerService>();
125
var logger = app.
Services
.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
TestingAppHost1.AppHost (1)
Program.cs (1)
64
var notifications = app.
Services
.GetRequiredService<ResourceNotificationService>();