Implemented interface member:
property
Services
Microsoft.Extensions.Hosting.IHost.Services
368 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)
487
_executionContextOptions.ServiceProvider = application.
Services
.GetRequiredService<IServiceProvider>();
Aspire.Hosting.Azure.Tests (73)
AzureBicepProvisionerTests.cs (2)
278
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
282
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
AzureBicepResourceTests.cs (9)
89
var hooks = app.
Services
.GetServices<IDistributedApplicationLifecycleHook>();
253
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
290
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
800
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1824
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1939
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2366
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2669
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2827
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureContainerAppsTests.cs (32)
39
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
120
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
218
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
357
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
465
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
577
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
667
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
777
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1115
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1214
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1297
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1400
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1508
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1616
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1755
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1970
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2045
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2128
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2218
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2299
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2438
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2642
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
2855
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
3063
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
3084
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
3103
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
3123
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
3142
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
3161
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
3179
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
3205
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
3251
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureCosmosDBEmulatorFunctionalTests.cs (3)
173
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
221
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
290
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
AzureCosmosDBExtensionsTests.cs (1)
201
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureEventHubsExtensionsTests.cs (1)
285
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureFunctionsTests.cs (7)
150
var model = host.
Services
.GetRequiredService<DistributedApplicationModel>();
171
var model = host.
Services
.GetRequiredService<DistributedApplicationModel>();
269
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
299
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
391
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
474
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
539
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureKeyVaultTests.cs (1)
67
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzurePostgresExtensionsTests.cs (2)
37
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
157
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzurePublisherTests.cs (1)
80
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureRedisExtensionsTests.cs (2)
38
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
111
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureResourcePreparerTests.cs (2)
62
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
152
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureServiceBusExtensionsTests.cs (1)
217
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
AzureSignalRExtensionsTests.cs (2)
22
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
111
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureStorageEmulatorFunctionalTests.cs (1)
47
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
ContainerRegistryTests.cs (4)
30
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
60
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
98
var publisher = app.
Services
.GetRequiredKeyedService<IDistributedApplicationPublisher>("test-publisher") as ContainerRegistryValidatingPublisher;
100
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
ExistingAzureResourceTests.cs (1)
177
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
RoleAssignmentTests.cs (1)
478
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.Docker.Tests (3)
DockerComposePublisherTests.cs (3)
63
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
173
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
310
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
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)
44
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.Kubernetes.Tests (2)
KubernetesPublisherTests.cs (2)
76
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
124
var model = 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>();
137
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)
145
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
471
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
506
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
607
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
617
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 (158)
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)
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 (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>();
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>>();
232
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
233
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
234
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
357
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
415
var s = app.
Services
.GetRequiredService<IKubernetesService>();
462
var s = app.
Services
.GetRequiredService<IKubernetesService>();
498
var events = app.
Services
.GetRequiredService<IDistributedApplicationEventing>();
505
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
506
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
507
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
548
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
549
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
550
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
591
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
595
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
644
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
648
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
684
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
688
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
719
var s = app.
Services
.GetRequiredService<IKubernetesService>();
721
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
748
var s = app.
Services
.GetRequiredService<IKubernetesService>();
750
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
777
var s = app.
Services
.GetRequiredService<IKubernetesService>();
779
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
807
var s = app.
Services
.GetRequiredService<IKubernetesService>();
809
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
833
var s = app.
Services
.GetRequiredService<IKubernetesService>();
893
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
912
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1050
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1100
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1154
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1155
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)
85
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
123
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)
71
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
185
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
212
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
230
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
246
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
294
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
314
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
357
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
379
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
404
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
434
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
453
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
477
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
527
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
622
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>();
150
ServiceProvider = app.
Services
,
180
ServiceProvider = app.
Services
,
209
ServiceProvider = app.
Services
,
254
ServiceProvider = app.
Services
,
297
ServiceProvider = app.
Services
,
341
ServiceProvider = app.
Services
,
WithUrlsTests.cs (4)
304
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
340
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
379
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
431
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)
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>();
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>();