Implemented interface member:
property
Services
Microsoft.Extensions.Hosting.IHost.Services
633 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)
684
_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 (156)
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)
149
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
192
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
242
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
289
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
345
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
449
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
626
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
672
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
879
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
996
var deploymentStateManager = app.
Services
.GetRequiredService<IDeploymentStateManager>();
1085
var deploymentStateManager = app.
Services
.GetRequiredService<IDeploymentStateManager>();
1117
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 (7)
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>();
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 (1)
237
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.Kafka.Tests (2)
AddKafkaTests.cs (2)
22
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
64
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
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 (4)
MauiMacCatalystExtensionsTests.cs (2)
238
await app.
Services
.GetRequiredService<IDistributedApplicationEventing>()
239
.PublishAsync(new BeforeResourceStartedEvent(macCatalyst.Resource, app.
Services
), CancellationToken.None);
MauiWindowsExtensionsTests.cs (2)
225
await app.
Services
.GetRequiredService<IDistributedApplicationEventing>()
226
.PublishAsync(new BeforeResourceStartedEvent(windows.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 (3)
AddMongoDBTests.cs (3)
23
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
51
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
82
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.MySql.Tests (9)
AddMySqlTests.cs (8)
43
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
82
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
120
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
139
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
243
await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.
Services
));
271
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
274
builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.
Services
));
363
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
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.NodeJs.Tests (28)
AddNodeAppTests.cs (3)
215
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
242
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
272
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.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 (24)
AddPythonAppTests.cs (24)
154
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
192
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
234
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
401
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
434
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
495
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
523
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
545
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
566
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
602
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
618
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
637
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
656
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
677
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
713
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
747
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
779
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
803
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
825
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
851
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1106
var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.
Services
);
1144
var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.
Services
);
1184
var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.
Services
);
1221
var commandArguments = await ArgumentEvaluator.GetArgumentListAsync(resource, app.
Services
);
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 (15)
AddRedisTests.cs (10)
30
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
58
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
89
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
106
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
121
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
467
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
496
await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.
Services
));
522
await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.
Services
));
543
await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.
Services
));
695
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
RedisFunctionalTests.cs (5)
144
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
476
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
511
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
612
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
622
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)
102
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
164
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
401
var hostEnvironment = app.
Services
.GetRequiredService<IHostEnvironment>();
417
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 (279)
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)
38
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
63
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
147
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
189
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
238
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
270
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
302
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
335
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
372
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
392
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
426
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
460
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
524
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
546
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
582
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
686
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
796
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
841
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
878
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
913
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
973
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
994
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1030
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1067
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1104
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1134
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1171
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1193
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1228
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1268
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1292
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1327
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1363
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1403
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1434
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1465
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1495
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1524
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1572
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1617
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1654
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1695
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1731
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1773
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1815
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1857
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1894
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1931
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1974
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 (50)
134
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
135
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
136
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
177
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
178
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
179
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
252
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
253
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
254
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
329
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
330
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
331
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
489
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
547
var s = app.
Services
.GetRequiredService<IKubernetesService>();
605
var s = app.
Services
.GetRequiredService<IKubernetesService>();
654
var s = app.
Services
.GetRequiredService<IKubernetesService>();
655
var dc = app.
Services
.GetRequiredService<IDeveloperCertificateService>();
733
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
734
var s = app.
Services
.GetRequiredService<IKubernetesService>();
757
var events = app.
Services
.GetRequiredService<IDistributedApplicationEventing>();
764
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
765
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
766
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
807
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
808
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
809
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
851
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
855
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
902
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
906
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
936
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
940
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
976
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
980
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1011
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1013
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1040
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1042
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1069
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1071
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1099
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1101
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1125
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1185
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1204
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1346
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1400
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1467
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1494
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1496
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)
79
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
198
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
225
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
243
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
259
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
309
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
329
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
372
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
394
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
419
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
449
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
468
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
492
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
542
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
644
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
675
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
693
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
711
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
730
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
748
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
790
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
825
var mockImageBuilder = (MockImageBuilder)app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
831
var fakeContainerRuntime = (FakeContainerRuntime)app.
Services
.GetRequiredService<IContainerRuntime>();
Publishing\ResourceContainerImageBuilderTests.cs (37)
35
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
39
var collector = app.
Services
.GetFakeLogCollector();
67
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
71
var collector = app.
Services
.GetFakeLogCollector();
99
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
103
var collector = app.
Services
.GetFakeLogCollector();
137
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
141
var collector = app.
Services
.GetFakeLogCollector();
175
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
179
var collector = app.
Services
.GetFakeLogCollector();
209
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
213
var collector = app.
Services
.GetFakeLogCollector();
247
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
251
var collector = app.
Services
.GetFakeLogCollector();
288
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
292
var collector = app.
Services
.GetFakeLogCollector();
327
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
331
var collector = app.
Services
.GetFakeLogCollector();
363
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
367
var collector = app.
Services
.GetFakeLogCollector();
392
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
398
var collector = app.
Services
.GetFakeLogCollector();
443
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
449
var collector = app.
Services
.GetFakeLogCollector();
470
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
496
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
518
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
539
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
569
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
601
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
633
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
670
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
677
var collector = app.
Services
.GetFakeLogCollector();
716
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
720
var collector = app.
Services
.GetFakeLogCollector();
788
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
883
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)
276
Services = app.
Services
,
307
Services = app.
Services
,
339
Services = app.
Services
,
377
Services = app.
Services
,
Aspire.Playground.Tests (11)
AppHostTests.cs (1)
68
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Infrastructure\DistributedApplicationExtensions.cs (6)
104
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
114
var environment = app.
Services
.GetRequiredService<IHostEnvironment>();
115
var logCollector = app.
Services
.GetFakeLogCollector();
132
var environment = app.
Services
.GetRequiredService<IHostEnvironment>();
133
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
212
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)
59
var notifications = app.
Services
.GetRequiredService<ResourceNotificationService>();