Implemented interface member:
property
Services
Microsoft.Extensions.Hosting.IHost.Services
375 references to Services
Aspire.Hosting (2)
DistributedApplication.cs (1)
230
/// exposes a <see cref="
Services
"/> property which allows developers to get services from the
DistributedApplicationBuilder.cs (1)
511
_executionContextOptions.ServiceProvider = application.
Services
.GetRequiredService<IServiceProvider>();
Aspire.Hosting.Azure.Tests (85)
AzureAppServiceTests.cs (4)
36
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
66
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
94
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
132
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureBicepProvisionerTests.cs (2)
277
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
281
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
AzureBicepResourceTests.cs (9)
88
var hooks = app.
Services
.GetServices<IDistributedApplicationLifecycleHook>();
252
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
289
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
515
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1154
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1220
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1523
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1748
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1879
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureContainerAppsTests.cs (33)
39
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
74
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
105
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
148
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
181
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
226
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
257
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
329
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
407
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
474
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
511
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
550
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
591
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
624
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
677
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
750
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
794
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
826
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
859
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
889
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
927
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
972
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1014
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1053
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1074
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1093
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1113
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1132
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1151
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1169
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1195
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1241
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1299
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureContainerRegistryTests.cs (3)
29
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
51
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
88
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 (1)
200
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureEventHubsExtensionsTests.cs (1)
289
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureFunctionsTests.cs (7)
149
var model = host.
Services
.GetRequiredService<DistributedApplicationModel>();
170
var model = host.
Services
.GetRequiredService<DistributedApplicationModel>();
268
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
298
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
325
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
353
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
383
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureKeyVaultTests.cs (1)
35
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzurePostgresExtensionsTests.cs (2)
36
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
59
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureRedisExtensionsTests.cs (2)
37
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
57
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureResourcePreparerTests.cs (2)
61
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
107
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureServiceBusExtensionsTests.cs (1)
134
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
AzureSignalRExtensionsTests.cs (2)
21
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
43
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureStorageEmulatorFunctionalTests.cs (3)
46
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
92
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
156
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
AzureUserAssignedIdentityTests.cs (3)
29
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
49
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
71
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)
76
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
RoleAssignmentTests.cs (1)
477
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Containers.Tests (11)
ContainerResourceTests.cs (6)
22
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
41
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
60
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
80
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
217
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
285
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
WithDockerfileTests.cs (5)
77
var collector = app.
Services
.GetFakeLogCollector();
189
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
221
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
449
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
519
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
Aspire.Hosting.Garnet.Tests (6)
AddGarnetTests.cs (6)
23
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
51
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
80
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
344
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
365
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
382
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Kafka.Tests (2)
AddKafkaTests.cs (2)
23
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
65
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Keycloak.Tests (1)
KeycloakResourceBuilderTests.cs (1)
24
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Milvus.Tests (3)
AddMilvusTests.cs (3)
26
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
56
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
185
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.MongoDB.Tests (3)
AddMongoDBTests.cs (3)
24
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
52
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
83
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.MySql.Tests (10)
AddMySqlTests.cs (9)
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>();
242
await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.
Services
, app.
Services
.GetRequiredService<DistributedApplicationModel>()));
272
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
274
builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.
Services
, app.
Services
.GetRequiredService<DistributedApplicationModel>()));
MySqlFunctionalTests.cs (1)
498
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Nats.Tests (4)
AddNatsTests.cs (4)
47
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
76
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
94
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
136
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Oracle.Tests (5)
AddOracleTests.cs (5)
43
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
82
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
120
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
140
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
163
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.PostgreSQL.Tests (15)
AddPostgresTests.cs (14)
53
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
107
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
175
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
197
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
378
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
381
await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.
Services
, app.
Services
.GetRequiredService<DistributedApplicationModel>()));
471
await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.
Services
, app.
Services
.GetRequiredService<DistributedApplicationModel>()));
482
var entries = await createServers.Callback(new() { Model = pgadmin, ServiceProvider = app.
Services
}, CancellationToken.None);
541
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
543
await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.
Services
, app.
Services
.GetRequiredService<DistributedApplicationModel>()));
553
var entries = await createBookmarks.Callback(new() { Model = pgweb, ServiceProvider = app.
Services
}, CancellationToken.None);
PostgresFunctionalTests.cs (1)
483
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Python.Tests (3)
AddPythonAppTests.cs (3)
145
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
181
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
220
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Qdrant.Tests (4)
AddQdrantTests.cs (4)
46
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
85
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
118
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
284
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.RabbitMQ.Tests (3)
AddRabbitMQTests.cs (3)
51
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
103
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
142
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Redis.Tests (20)
AddRedisTests.cs (15)
31
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
59
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
90
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
107
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
122
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
269
await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.
Services
, app.
Services
.GetRequiredService<DistributedApplicationModel>()));
407
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
426
await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.
Services
, app.
Services
.GetRequiredService<DistributedApplicationModel>()));
450
await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.
Services
, app.
Services
.GetRequiredService<DistributedApplicationModel>()));
471
await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.
Services
, app.
Services
.GetRequiredService<DistributedApplicationModel>()));
623
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
RedisFunctionalTests.cs (5)
144
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
470
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
505
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
606
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
616
var clientFactory = app.
Services
.GetRequiredService<IHttpClientFactory>();
Aspire.Hosting.Seq.Tests (3)
AddSeqTests.cs (3)
22
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
50
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
79
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.SqlServer.Tests (4)
AddSqlServerTests.cs (4)
44
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
91
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
113
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
277
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Testing (4)
DistributedApplicationFactory.cs (1)
172
_shutdownTimeout = application.
Services
.GetService<IOptions<HostOptions>>()?.Value.ShutdownTimeout ?? _shutdownTimeout;
DistributedApplicationHostingTestingExtensions.cs (3)
29
var clientFactory = app.
Services
.GetRequiredService<IHttpClientFactory>();
78
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
119
var lifetime = app.
Services
.GetRequiredService<IHostApplicationLifetime>();
Aspire.Hosting.Testing.Tests (7)
TestingBuilderTests.cs (3)
161
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
397
var hostEnvironment = app.
Services
.GetRequiredService<IHostEnvironment>();
413
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 (162)
AddParameterTests.cs (8)
25
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
62
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
96
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
146
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
203
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
268
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
298
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
336
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AspireStoreTests.cs (3)
37
var store = app.
Services
.GetRequiredService<IAspireStore>();
61
var store = app.
Services
.GetRequiredService<IAspireStore>();
135
return app.
Services
.GetRequiredService<IAspireStore>();
Codespaces\CodespacesUrlRewriterTests.cs (1)
35
var collector = app.
Services
.GetFakeLogCollector();
Dashboard\DashboardResourceTests.cs (17)
47
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
71
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
104
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
176
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
214
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
251
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
285
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
321
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
330
var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.
Services
).DefaultTimeout();
365
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
369
var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.
Services
).DefaultTimeout();
390
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
406
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
457
var resourceLoggerService = app.
Services
.GetRequiredService<ResourceLoggerService>();
471
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
472
var resourceNotificationService = app.
Services
.GetRequiredService<ResourceNotificationService>();
523
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Dcp\DcpExecutorTests.cs (29)
35
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
60
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
144
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
187
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
236
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
268
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
300
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
333
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
370
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
390
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
424
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
458
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
522
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
544
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
580
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
678
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
784
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
829
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
866
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
901
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
961
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
982
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1018
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1055
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1092
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1122
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1159
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1181
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1216
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
DistributedApplicationBuilderTests.cs (8)
40
Assert.NotNull(app.
Services
.GetRequiredKeyedService<IDistributedApplicationPublisher>("manifest"));
42
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
45
var lifecycles = app.
Services
.GetServices<IDistributedApplicationLifecycleHook>();
52
var options = app.
Services
.GetRequiredService<IOptions<PublishingOptions>>();
64
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
100
var config = app.
Services
.GetRequiredService<IConfiguration>();
110
var config = app.
Services
.GetRequiredService<IConfiguration>();
123
var config = app.
Services
.GetRequiredService<IConfiguration>();
DistributedApplicationTests.cs (40)
127
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
128
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
129
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
170
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
171
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
172
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
245
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
246
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
247
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
381
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
439
var s = app.
Services
.GetRequiredService<IKubernetesService>();
486
var s = app.
Services
.GetRequiredService<IKubernetesService>();
522
var events = app.
Services
.GetRequiredService<IDistributedApplicationEventing>();
529
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
530
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
531
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
572
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
573
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
574
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
615
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
619
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
668
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
672
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
708
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
712
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
743
var s = app.
Services
.GetRequiredService<IKubernetesService>();
745
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
772
var s = app.
Services
.GetRequiredService<IKubernetesService>();
774
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
801
var s = app.
Services
.GetRequiredService<IKubernetesService>();
803
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
831
var s = app.
Services
.GetRequiredService<IKubernetesService>();
833
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
857
var s = app.
Services
.GetRequiredService<IKubernetesService>();
917
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
936
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1078
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1128
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1182
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1183
var lifecycles = app.
Services
.GetServices<IDistributedApplicationLifecycleHook>();
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
169
var eventing = app.
Services
.GetRequiredService<IDistributedApplicationEventing>();
Health\ResourceHealthCheckServiceTests.cs (6)
160
var healthService = app.
Services
.GetRequiredService<ResourceHealthCheckService>();
223
var logger = app.
Services
.GetRequiredService<ILogger<ResourceHealthCheckServiceTests>>();
224
var rhcs = app.
Services
.GetRequiredService<ResourceHealthCheckService>();
263
var logger = app.
Services
.GetRequiredService<ILogger<ResourceHealthCheckServiceTests>>();
264
var rhcs = app.
Services
.GetRequiredService<ResourceHealthCheckService>();
486
var rhcs = app.
Services
.GetRequiredService<ResourceHealthCheckService>();
HealthCheckTests.cs (2)
102
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
140
var collector = app.
Services
.GetFakeLogCollector();
Helpers\JsonDocumentManifestPublisher.cs (1)
44
var publisher = testProgram.App?.
Services
.GetRequiredKeyedService<IDistributedApplicationPublisher>("manifest") as JsonDocumentManifestPublisher;
KestrelConfigTests.cs (1)
360
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
ManifestGenerationTests.cs (1)
121
var publisher = program.
Services
.GetManifestPublisher();
Orchestrator\ApplicationOrchestratorTests.cs (8)
27
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
74
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
119
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
162
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
229
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
281
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
333
var e = Assert.Throws<InvalidOperationException>(() => app.
Services
.GetService<ApplicationOrchestrator>());
351
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Orchestrator\RelationshipEvaluatorTests.cs (1)
29
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
ProjectResourceTests.cs (15)
72
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
186
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
213
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
231
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
247
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
297
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
317
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
360
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
382
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
407
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
437
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
456
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
480
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
530
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
625
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Publishing\ResourceContainerImageBuilderTests.cs (2)
28
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
44
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)
575
var collector = app.
Services
.GetFakeLogCollector();
WithEndpointTests.cs (1)
210
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
WithEnvironmentTests.cs (1)
30
var serviceProvider = app.
Services
.GetRequiredService<IServiceProvider>();
WithHttpCommandTests.cs (7)
31
var httpClientFactory = app.
Services
.GetService<IHttpClientFactory>();
194
ServiceProvider = app.
Services
,
224
ServiceProvider = app.
Services
,
253
ServiceProvider = app.
Services
,
298
ServiceProvider = app.
Services
,
341
ServiceProvider = app.
Services
,
385
ServiceProvider = app.
Services
,
WithUrlsTests.cs (4)
333
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
369
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
408
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
460
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Valkey.Tests (6)
AddValkeyTests.cs (6)
23
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
51
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
80
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
99
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
116
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
334
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Playground.Tests (11)
AppHostTests.cs (1)
68
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Infrastructure\DistributedApplicationExtensions.cs (6)
102
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
113
var environment = app.
Services
.GetRequiredService<IHostEnvironment>();
114
var logCollector = app.
Services
.GetFakeLogCollector();
131
var environment = app.
Services
.GetRequiredService<IHostEnvironment>();
132
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
211
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>();