Implemented interface member:
property
Services
Microsoft.Extensions.Hosting.IHost.Services
309 references to Services
Aspire.Hosting (2)
DistributedApplication.cs (1)
196
/// exposes a <see cref="
Services
"/> property which allows developers to get services from the
DistributedApplicationBuilder.cs (1)
416
_executionContextOptions.ServiceProvider = application.
Services
.GetRequiredService<IServiceProvider>();
Aspire.Hosting.Azure.Tests (28)
AzureBicepResourceTests.cs (1)
88
var hooks = app.
Services
.GetServices<IDistributedApplicationLifecycleHook>();
AzureContainerAppsTests.cs (20)
33
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
129
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
233
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
378
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
518
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
773
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
871
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
983
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1134
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1292
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1381
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1479
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1584
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1680
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1816
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1837
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1856
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1876
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1895
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1914
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureCosmosDBEmulatorFunctionalTests.cs (1)
46
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
AzureEventHubsExtensionsTests.cs (1)
47
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
AzureFunctionsTests.cs (2)
124
var model = host.
Services
.GetRequiredService<DistributedApplicationModel>();
145
var model = host.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureServiceBusExtensionsTests.cs (2)
210
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
248
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
AzureStorageEmulatorFunctionalTests.cs (1)
48
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Containers.Tests (10)
ContainerResourceTests.cs (4)
22
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
41
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
173
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
241
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
WithDockerfileTests.cs (6)
78
var collector = app.
Services
.GetFakeLogCollector();
111
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
143
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
371
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
441
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
756
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Dapr.Tests (2)
DaprTests.cs (2)
38
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
137
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Elasticsearch.Tests (4)
AddElasticsearchTests.cs (3)
24
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
86
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
147
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
ElasticsearchFunctionalTests.cs (1)
229
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Garnet.Tests (4)
AddGarnetTests.cs (3)
22
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
50
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
79
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
GarnetFunctionalTests.cs (1)
42
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Kafka.Tests (3)
AddKafkaTests.cs (2)
23
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
65
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
KafkaFunctionalTests.cs (1)
43
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Keycloak.Tests (1)
KeycloakResourceBuilderTests.cs (1)
24
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Milvus.Tests (3)
AddMilvusTests.cs (3)
27
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
58
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
191
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.MongoDB.Tests (4)
AddMongoDBTests.cs (3)
24
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
52
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
83
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
MongoDbFunctionalTests.cs (1)
54
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.MySql.Tests (10)
AddMySqlTests.cs (9)
44
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
84
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
122
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
141
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
243
await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.
Services
, app.
Services
.GetRequiredService<DistributedApplicationModel>()));
282
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
284
builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.
Services
, app.
Services
.GetRequiredService<DistributedApplicationModel>()));
MySqlFunctionalTests.cs (1)
50
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Nats.Tests (5)
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>();
NatsFunctionalTests.cs (1)
345
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Oracle.Tests (6)
AddOracleTests.cs (5)
43
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
83
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
121
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
141
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
165
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
OracleFunctionalTests.cs (1)
373
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.PostgreSQL.Tests (10)
AddPostgresTests.cs (9)
53
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
108
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
176
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
199
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
468
await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.
Services
, app.
Services
.GetRequiredService<DistributedApplicationModel>()));
514
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
516
await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.
Services
, app.
Services
.GetRequiredService<DistributedApplicationModel>()));
PostgresFunctionalTests.cs (1)
53
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Python.Tests (4)
AddPythonAppTests.cs (4)
97
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
140
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
176
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
215
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Qdrant.Tests (5)
AddQdrantTests.cs (4)
46
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
85
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
119
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
287
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
QdrantFunctionalTests.cs (1)
245
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.RabbitMQ.Tests (4)
AddRabbitMQTests.cs (3)
51
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
104
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
138
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
RabbitMQFunctionalTests.cs (1)
44
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Redis.Tests (10)
AddRedisTests.cs (7)
31
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
59
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
88
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
216
await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.
Services
, app.
Services
.GetRequiredService<DistributedApplicationModel>()));
240
await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new (app.
Services
, app.
Services
.GetRequiredService<DistributedApplicationModel>()));
RedisFunctionalTests.cs (3)
48
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
222
var rns = app2.
Services
.GetRequiredService<ResourceNotificationService>();
224
var executorProxy = app2.
Services
.GetRequiredService<ApplicationExecutorProxy>();
Aspire.Hosting.SqlServer.Tests (4)
AddSqlServerTests.cs (3)
44
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
92
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
115
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
SqlServerFunctionalTests.cs (1)
44
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Testing (3)
DistributedApplicationHostingTestingExtensions.cs (3)
26
var clientFactory = app.
Services
.GetRequiredService<IHttpClientFactory>();
66
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
107
var lifetime = app.
Services
.GetRequiredService<IHostApplicationLifetime>();
Aspire.Hosting.Testing.Tests (8)
TestingBuilderTests.cs (3)
140
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
190
var hostEnvironment = app.
Services
.GetRequiredService<IHostEnvironment>();
205
var config = app.
Services
.GetRequiredService<IConfiguration>();
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (5)
35
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
68
var hostApplicationLifetime = app.
Services
.GetRequiredService<IHostApplicationLifetime>();
114
var resourceNotificationService = app.
Services
.GetRequiredService<ResourceNotificationService>();
115
var resourceLoggerService = app.
Services
.GetRequiredService<ResourceLoggerService>();
116
var logger = app.
Services
.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
Aspire.Hosting.Tests (160)
AddParameterTests.cs (8)
26
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
63
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
93
Assert.Contains(app.
Services
.GetServices<IDistributedApplicationLifecycleHook>(), hook => hook.GetType().Name == "WriteParameterLogsHook");
110
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
144
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
194
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
251
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
308
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Codespaces\CodespacesUrlRewriterTests.cs (3)
33
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
37
var collector = app.
Services
.GetFakeLogCollector();
71
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
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\ApplicationExecutorTests.cs (50)
36
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
38
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService);
61
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
74
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService, dcpOptions: dcpOptions, eventing: eventing, resourceNotificationService: resourceNotificationService);
113
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
114
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService);
145
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
146
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService);
177
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
178
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService);
210
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
211
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService);
247
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
248
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService);
267
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
268
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService);
301
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
302
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService);
335
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
336
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService);
399
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
400
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService);
421
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
423
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService, dcpOptions: dcpOptions);
457
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
460
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService, dcpOptions: dcpOptions, resourceLoggerService: resourceLoggerService);
555
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
558
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService, dcpOptions: dcpOptions, resourceLoggerService: resourceLoggerService);
661
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
662
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService);
706
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
707
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService);
743
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
744
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService);
778
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
779
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService);
838
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
839
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService);
859
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
860
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService);
895
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
896
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService);
932
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
933
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService);
962
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
963
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService);
982
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
983
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService);
1001
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1005
var appExecutor = CreateAppExecutor(distributedAppModel, app.
Services
, kubernetesService: kubernetesService, resourceNotificationService: resourceNotificationService);
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 (30)
192
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
251
var s = app.
Services
.GetRequiredService<IKubernetesService>();
279
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
280
var applicationExecutor = app.
Services
.GetRequiredService<ApplicationExecutor>();
281
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
316
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
317
var applicationExecutor = app.
Services
.GetRequiredService<ApplicationExecutor>();
318
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
359
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
363
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
412
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
416
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
451
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
455
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
486
var s = app.
Services
.GetRequiredService<IKubernetesService>();
488
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
515
var s = app.
Services
.GetRequiredService<IKubernetesService>();
517
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
544
var s = app.
Services
.GetRequiredService<IKubernetesService>();
546
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
574
var s = app.
Services
.GetRequiredService<IKubernetesService>();
576
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
600
var s = app.
Services
.GetRequiredService<IKubernetesService>();
660
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
679
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
815
var s = app.
Services
.GetRequiredService<IKubernetesService>();
818
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
852
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
868
var s = app.
Services
.GetRequiredService<IKubernetesService>();
869
var lifecycles = app.
Services
.GetServices<IDistributedApplicationLifecycleHook>();
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
169
var eventing = app.
Services
.GetRequiredService<IDistributedApplicationEventing>();
Health\ResourceHealthCheckServiceTests.cs (9)
25
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
59
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
102
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
149
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
189
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
220
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
270
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
330
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
383
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
HealthCheckTests.cs (2)
86
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
124
var collector = app.
Services
.GetFakeLogCollector();
Helpers\JsonDocumentManifestPublisher.cs (1)
45
var publisher = testProgram.App?.
Services
.GetRequiredKeyedService<IDistributedApplicationPublisher>("manifest") as JsonDocumentManifestPublisher;
KestrelConfigTests.cs (1)
360
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
ManifestGenerationTests.cs (1)
158
var publisher = program.
Services
.GetManifestPublisher();
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 (5)
35
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
68
var hostApplicationLifetime = app.
Services
.GetRequiredService<IHostApplicationLifetime>();
114
var resourceNotificationService = app.
Services
.GetRequiredService<ResourceNotificationService>();
115
var resourceLoggerService = app.
Services
.GetRequiredService<ResourceLoggerService>();
116
var logger = app.
Services
.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
WaitForTests.cs (7)
31
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
107
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
148
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
196
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
244
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
293
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
327
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
WithEndpointTests.cs (1)
210
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
WithEnvironmentTests.cs (1)
28
var serviceProvider = app.
Services
.GetRequiredService<IServiceProvider>();
Aspire.Hosting.Valkey.Tests (4)
AddValkeyTests.cs (3)
22
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
50
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
79
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
ValkeyFunctionalTests.cs (1)
219
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Playground.Tests (15)
AppHostTests.cs (2)
70
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
71
var resourceNotificationService = app.
Services
.GetRequiredService<ResourceNotificationService>();
Infrastructure\DistributedApplicationExtensions.cs (8)
88
var resourceNotificationService = app.
Services
.GetRequiredService<ResourceNotificationService>();
102
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
103
var resourceNotificationService = app.
Services
.GetRequiredService<ResourceNotificationService>();
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>();
213
var logger = app.
Services
.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(TryApplyEfMigrationsAsync));
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (5)
35
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
68
var hostApplicationLifetime = app.
Services
.GetRequiredService<IHostApplicationLifetime>();
114
var resourceNotificationService = app.
Services
.GetRequiredService<ResourceNotificationService>();
115
var resourceLoggerService = app.
Services
.GetRequiredService<ResourceLoggerService>();
116
var logger = app.
Services
.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));