Implemented interface member:
property
Services
Microsoft.Extensions.Hosting.IHost.Services
303 references to Services
Aspire.Hosting (2)
DistributedApplication.cs (1)
197
/// exposes a <see cref="
Services
"/> property which allows developers to get services from the
DistributedApplicationBuilder.cs (1)
448
_executionContextOptions.ServiceProvider = application.
Services
.GetRequiredService<IServiceProvider>();
Aspire.Hosting.Azure.Tests (35)
AzureBicepResourceTests.cs (1)
88
var hooks = app.
Services
.GetServices<IDistributedApplicationLifecycleHook>();
AzureContainerAppsTests.cs (25)
33
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
129
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
233
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
375
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
486
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
603
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
706
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
832
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1093
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1191
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1309
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1432
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1555
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1707
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1865
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1954
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2052
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2157
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2253
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2389
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2410
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2429
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2449
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2468
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2487
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureCosmosDBEmulatorFunctionalTests.cs (3)
174
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
222
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
291
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
AzureEventHubsExtensionsTests.cs (2)
49
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
136
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
AzureFunctionsTests.cs (2)
147
var model = host.
Services
.GetRequiredService<DistributedApplicationModel>();
168
var model = host.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureServiceBusExtensionsTests.cs (1)
240
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
AzureStorageEmulatorFunctionalTests.cs (1)
48
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
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>();
213
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
281
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.Elasticsearch.Tests (4)
AddElasticsearchTests.cs (3)
24
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
85
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
146
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
ElasticsearchFunctionalTests.cs (1)
45
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
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 (13)
AddPostgresTests.cs (12)
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>()));
472
await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.
Services
, app.
Services
.GetRequiredService<DistributedApplicationModel>()));
531
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
533
await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.
Services
, app.
Services
.GetRequiredService<DistributedApplicationModel>()));
PostgresFunctionalTests.cs (1)
480
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Python.Tests (3)
AddPythonAppTests.cs (3)
143
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
179
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
218
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>();
137
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Redis.Tests (15)
AddRedisTests.cs (12)
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>();
331
await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.
Services
, app.
Services
.GetRequiredService<DistributedApplicationModel>()));
355
await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.
Services
, app.
Services
.GetRequiredService<DistributedApplicationModel>()));
376
await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new (app.
Services
, app.
Services
.GetRequiredService<DistributedApplicationModel>()));
528
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
RedisFunctionalTests.cs (3)
224
var executorProxy = app2.
Services
.GetRequiredService<ApplicationOrchestratorProxy>();
731
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
741
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 (3)
AddSqlServerTests.cs (3)
44
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
91
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
113
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)
162
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
399
var hostEnvironment = app.
Services
.GetRequiredService<IHostEnvironment>();
415
var config = app.
Services
.GetRequiredService<IConfiguration>();
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (4)
35
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
68
var hostApplicationLifetime = app.
Services
.GetRequiredService<IHostApplicationLifetime>();
114
var resourceLoggerService = app.
Services
.GetRequiredService<ResourceLoggerService>();
115
var logger = app.
Services
.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
Aspire.Hosting.Tests (144)
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)
36
var collector = app.
Services
.GetFakeLogCollector();
Dashboard\DashboardResourceTests.cs (17)
46
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
70
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
101
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
171
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
207
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
242
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
274
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
310
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
319
var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.
Services
).DefaultTimeout();
353
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
357
var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.
Services
).DefaultTimeout();
378
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
394
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
445
var resourceLoggerService = app.
Services
.GetRequiredService<ResourceLoggerService>();
459
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
460
var resourceNotificationService = app.
Services
.GetRequiredService<ResourceNotificationService>();
511
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Dcp\DcpExecutorTests.cs (28)
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>();
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>();
121
var config = app.
Services
.GetRequiredService<IConfiguration>();
DistributedApplicationTests.cs (39)
125
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
126
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
127
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
168
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
169
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
170
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
230
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
231
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
232
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
357
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
416
var s = app.
Services
.GetRequiredService<IKubernetesService>();
445
var events = app.
Services
.GetRequiredService<IDistributedApplicationEventing>();
452
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
453
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
454
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
495
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
496
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
497
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
539
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
543
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
593
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
597
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
633
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
637
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
669
var s = app.
Services
.GetRequiredService<IKubernetesService>();
671
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
699
var s = app.
Services
.GetRequiredService<IKubernetesService>();
701
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
729
var s = app.
Services
.GetRequiredService<IKubernetesService>();
731
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
760
var s = app.
Services
.GetRequiredService<IKubernetesService>();
762
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
787
var s = app.
Services
.GetRequiredService<IKubernetesService>();
848
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
868
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1007
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1057
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1113
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1114
var lifecycles = app.
Services
.GetServices<IDistributedApplicationLifecycleHook>();
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
169
var eventing = app.
Services
.GetRequiredService<IDistributedApplicationEventing>();
Health\ResourceHealthCheckServiceTests.cs (6)
161
var healthService = app.
Services
.GetRequiredService<ResourceHealthCheckService>();
224
var logger = app.
Services
.GetRequiredService<ILogger<ResourceHealthCheckServiceTests>>();
225
var rhcs = app.
Services
.GetRequiredService<ResourceHealthCheckService>();
264
var logger = app.
Services
.GetRequiredService<ILogger<ResourceHealthCheckServiceTests>>();
265
var rhcs = app.
Services
.GetRequiredService<ResourceHealthCheckService>();
487
var rhcs = app.
Services
.GetRequiredService<ResourceHealthCheckService>();
HealthCheckTests.cs (2)
86
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
124
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 (5)
28
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
77
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
144
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
197
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
250
var e = Assert.Throws<InvalidOperationException>(() => app.
Services
.GetService<ApplicationOrchestrator>());
Orchestrator\RelationshipEvaluatorTests.cs (1)
29
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
ProjectResourceTests.cs (15)
69
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
183
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
210
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
228
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
244
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
292
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
312
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
355
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
377
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
402
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
432
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
451
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
475
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
525
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
617
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Utils\LoggerNotificationExtensions.cs (4)
35
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
68
var hostApplicationLifetime = app.
Services
.GetRequiredService<IHostApplicationLifetime>();
114
var resourceLoggerService = app.
Services
.GetRequiredService<ResourceLoggerService>();
115
var logger = app.
Services
.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
WaitForTests.cs (1)
576
var collector = app.
Services
.GetFakeLogCollector();
WithEndpointTests.cs (1)
210
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
WithEnvironmentTests.cs (1)
28
var serviceProvider = app.
Services
.GetRequiredService<IServiceProvider>();
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)
101
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
111
var environment = app.
Services
.GetRequiredService<IHostEnvironment>();
112
var logCollector = app.
Services
.GetFakeLogCollector();
129
var environment = app.
Services
.GetRequiredService<IHostEnvironment>();
130
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
209
var logger = app.
Services
.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(TryApplyEfMigrationsAsync));
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (4)
35
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
68
var hostApplicationLifetime = app.
Services
.GetRequiredService<IHostApplicationLifetime>();
114
var resourceLoggerService = app.
Services
.GetRequiredService<ResourceLoggerService>();
115
var logger = app.
Services
.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
TestingAppHost1.AppHost (1)
Program.cs (1)
59
var notifications = app.
Services
.GetRequiredService<ResourceNotificationService>();