Implemented interface member:
property
Services
Microsoft.Extensions.Hosting.IHost.Services
437 references to Services
Aspire.Hosting (2)
DistributedApplication.cs (1)
231
/// exposes a <see cref="
Services
"/> property which allows developers to get services from the
DistributedApplicationBuilder.cs (1)
568
_executionContextOptions.ServiceProvider = application.
Services
.GetRequiredService<IServiceProvider>();
Aspire.Hosting.Azure.Tests (113)
AzureAIFoundryExtensionsTests.cs (3)
88
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
93
var foundryManager = app.
Services
.GetRequiredService<FoundryLocalManager>();
140
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureAppConfigurationExtensionsTests.cs (1)
23
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureAppServiceTests.cs (8)
35
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
64
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
91
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
128
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
156
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
194
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
231
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
272
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureBicepProvisionerTests.cs (2)
59
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
63
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
AzureBicepResourceTests.cs (1)
78
var hooks = app.
Services
.GetServices<IDistributedApplicationLifecycleHook>();
AzureContainerAppsTests.cs (39)
36
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
70
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
100
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
142
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
174
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
218
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
248
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
319
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
396
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
435
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
465
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
501
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
537
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
575
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
615
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
647
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
680
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
762
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
805
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
836
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
868
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
897
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
934
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
978
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1019
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1057
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1078
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1097
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1117
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1136
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1155
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1173
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1204
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1260
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1311
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1381
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1403
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1433
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1479
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureContainerRegistryTests.cs (3)
28
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
50
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
86
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureCosmosDBEmulatorFunctionalTests.cs (3)
172
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
220
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
289
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
AzureCosmosDBExtensionsTests.cs (3)
202
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
296
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
333
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureEventHubsExtensionsTests.cs (4)
289
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
353
var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, ServiceProvider = app.
Services
}, CancellationToken.None);
414
var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, ServiceProvider = app.
Services
}, CancellationToken.None);
488
var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, ServiceProvider = app.
Services
}, CancellationToken.None);
AzureFunctionsTests.cs (7)
160
var model = host.
Services
.GetRequiredService<DistributedApplicationModel>();
186
var model = host.
Services
.GetRequiredService<DistributedApplicationModel>();
284
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
314
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
343
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
371
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
401
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureKeyVaultTests.cs (1)
35
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureOpenAIExtensionsTests.cs (1)
60
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzurePostgresExtensionsTests.cs (2)
36
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
59
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureRedisExtensionsTests.cs (2)
38
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
58
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureResourcePreparerTests.cs (3)
61
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
107
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
151
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureSearchExtensionsTests.cs (1)
40
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureServiceBusExtensionsTests.cs (6)
135
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
369
var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.
Services
}, CancellationToken.None);
468
var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.
Services
}, CancellationToken.None);
524
var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.
Services
}, CancellationToken.None);
583
var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.
Services
}, CancellationToken.None);
726
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureSignalRExtensionsTests.cs (2)
21
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
43
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureStorageEmulatorFunctionalTests.cs (6)
47
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
92
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
136
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
189
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
223
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
262
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
AzureStorageExtensionsTests.cs (1)
634
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureUserAssignedIdentityTests.cs (7)
30
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
49
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
70
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
115
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
152
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
207
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
283
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureWebPubSubExtensionsTests.cs (1)
287
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
ContainerRegistryTests.cs (4)
29
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
59
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
97
var publisher = app.
Services
.GetRequiredKeyedService<IDistributedApplicationPublisher>("test-publisher") as ContainerRegistryValidatingPublisher;
99
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
ExistingAzureResourceTests.cs (1)
76
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
RoleAssignmentTests.cs (1)
207
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Containers.Tests (15)
ContainerResourceTests.cs (10)
21
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
40
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
59
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
79
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
154
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
188
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
216
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
235
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
284
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
331
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
WithDockerfileTests.cs (5)
76
var collector = app.
Services
.GetFakeLogCollector();
188
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
220
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
448
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
518
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
Aspire.Hosting.Docker.Tests (1)
DockerComposePublisherTests.cs (1)
186
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
Aspire.Hosting.Garnet.Tests (6)
AddGarnetTests.cs (6)
22
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
50
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
79
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
343
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
364
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
381
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Kafka.Tests (2)
AddKafkaTests.cs (2)
22
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
64
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Keycloak.Tests (3)
KeycloakPublicApiTests.cs (2)
167
var entries = await containerAnnotation.Callback(new() { Model = keycloakResource, ServiceProvider = app.
Services
}, CancellationToken.None);
194
var entries = await containerAnnotation.Callback(new() { Model = keycloakResource, ServiceProvider = app.
Services
}, CancellationToken.None);
KeycloakResourceBuilderTests.cs (1)
23
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Milvus.Tests (3)
AddMilvusTests.cs (3)
25
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
55
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
184
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.MongoDB.Tests (3)
AddMongoDBTests.cs (3)
23
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
51
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
82
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.MySql.Tests (8)
AddMySqlTests.cs (7)
43
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
82
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
120
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
139
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
243
await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.
Services
));
271
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
274
builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.
Services
));
MySqlFunctionalTests.cs (1)
576
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Nats.Tests (4)
AddNatsTests.cs (4)
46
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
75
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
93
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
135
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Oracle.Tests (5)
AddOracleTests.cs (5)
42
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
81
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
119
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
139
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
162
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.PostgreSQL.Tests (9)
AddPostgresTests.cs (8)
52
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
106
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
174
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
196
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
377
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
476
var entries = await createServers.Callback(new() { Model = pgadmin, ServiceProvider = app.
Services
}, CancellationToken.None);
526
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
536
var entries = await createBookmarks.Callback(new() { Model = pgweb, ServiceProvider = app.
Services
}, CancellationToken.None);
PostgresFunctionalTests.cs (1)
562
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Python.Tests (3)
AddPythonAppTests.cs (3)
144
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
180
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
219
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Qdrant.Tests (4)
AddQdrantTests.cs (4)
45
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
84
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
117
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
283
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.RabbitMQ.Tests (3)
AddRabbitMQTests.cs (3)
50
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
102
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
141
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Redis.Tests (15)
AddRedisTests.cs (10)
30
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
58
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
89
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
106
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
121
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
463
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
492
await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.
Services
));
516
await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.
Services
));
537
await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.
Services
));
687
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
RedisFunctionalTests.cs (5)
144
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
476
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
511
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
612
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
622
var clientFactory = app.
Services
.GetRequiredService<IHttpClientFactory>();
Aspire.Hosting.Seq.Tests (3)
AddSeqTests.cs (3)
21
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
49
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
78
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.SqlServer.Tests (4)
AddSqlServerTests.cs (4)
43
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
90
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
112
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
276
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Hosting.Testing (6)
DistributedApplicationFactory.cs (2)
172
_shutdownTimeout = application.
Services
.GetService<IOptions<HostOptions>>()?.Value.ShutdownTimeout ?? _shutdownTimeout;
428
_hostApplicationLifetime = app.
Services
.GetService<IHostApplicationLifetime>()
DistributedApplicationHostingTestingExtensions.cs (3)
29
var clientFactory = app.
Services
.GetRequiredService<IHttpClientFactory>();
78
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
119
var lifetime = app.
Services
.GetRequiredService<IHostApplicationLifetime>();
DistributedApplicationTestingBuilder.cs (1)
290
public IServiceProvider Services => innerApp.
Services
;
Aspire.Hosting.Testing.Tests (11)
TestingBuilderTests.cs (4)
99
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
161
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
398
var hostEnvironment = app.
Services
.GetRequiredService<IHostEnvironment>();
414
var config = app.
Services
.GetRequiredService<IConfiguration>();
TestingFactoryTests.cs (3)
43
var appModel = _app.
Services
.GetRequiredService<DistributedApplicationModel>();
65
var appModel = _app.
Services
.GetRequiredService<IHostEnvironment>();
74
var config = _app.
Services
.GetRequiredService<IConfiguration>();
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (4)
35
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
78
var hostApplicationLifetime = app.
Services
.GetRequiredService<IHostApplicationLifetime>();
124
var resourceLoggerService = app.
Services
.GetRequiredService<ResourceLoggerService>();
125
var logger = app.
Services
.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
Aspire.Hosting.Tests (196)
AddParameterTests.cs (9)
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>();
375
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AspireStoreTests.cs (3)
36
var store = app.
Services
.GetRequiredService<IAspireStore>();
60
var store = app.
Services
.GetRequiredService<IAspireStore>();
134
return app.
Services
.GetRequiredService<IAspireStore>();
Backchannel\Exec\ExecTestsBase.cs (1)
28
var appHostRpcTarget = app.
Services
.GetRequiredService<AppHostRpcTarget>();
Codespaces\CodespacesUrlRewriterTests.cs (1)
34
var collector = app.
Services
.GetFakeLogCollector();
Dashboard\DashboardResourceTests.cs (17)
46
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
70
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
103
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
175
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
213
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
250
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
284
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
320
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
329
var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.
Services
).DefaultTimeout();
364
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
368
var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.
Services
).DefaultTimeout();
389
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
405
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
456
var resourceLoggerService = app.
Services
.GetRequiredService<ResourceLoggerService>();
470
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
471
var resourceNotificationService = app.
Services
.GetRequiredService<ResourceNotificationService>();
522
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Dcp\DcpCliArgsTests.cs (1)
54
var dcpOptions = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value;
Dcp\DcpExecutorTests.cs (29)
36
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
61
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
145
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
188
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
237
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
269
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
301
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
334
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
371
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
391
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
425
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
459
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
523
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
545
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
581
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
679
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
785
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
830
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
867
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
902
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
962
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
983
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1019
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1056
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1093
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1123
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1160
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1182
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1217
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
DistributedApplicationBuilderTests.cs (10)
39
Assert.NotNull(app.
Services
.GetRequiredKeyedService<IDistributedApplicationPublisher>("manifest"));
41
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
44
var lifecycles = app.
Services
.GetServices<IDistributedApplicationLifecycleHook>();
51
var options = app.
Services
.GetRequiredService<IOptions<PublishingOptions>>();
63
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
74
var publishOptions = app.
Services
.GetRequiredService<IOptions<PublishingOptions>>();
87
var publishOptions = app.
Services
.GetRequiredService<IOptions<PublishingOptions>>();
99
var config = app.
Services
.GetRequiredService<IConfiguration>();
109
var config = app.
Services
.GetRequiredService<IConfiguration>();
122
var config = app.
Services
.GetRequiredService<IConfiguration>();
DistributedApplicationModelExtensionsTests.cs (1)
26
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
DistributedApplicationTests.cs (44)
127
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
128
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
129
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
170
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
171
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
172
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
245
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
246
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
247
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
322
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
323
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
324
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
470
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
528
var s = app.
Services
.GetRequiredService<IKubernetesService>();
581
var s = app.
Services
.GetRequiredService<IKubernetesService>();
617
var events = app.
Services
.GetRequiredService<IDistributedApplicationEventing>();
624
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
625
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
626
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
667
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
668
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
669
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
711
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
715
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
766
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
770
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
806
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
810
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
841
var s = app.
Services
.GetRequiredService<IKubernetesService>();
843
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
870
var s = app.
Services
.GetRequiredService<IKubernetesService>();
872
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
899
var s = app.
Services
.GetRequiredService<IKubernetesService>();
901
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
929
var s = app.
Services
.GetRequiredService<IKubernetesService>();
931
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
955
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1015
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1034
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1176
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1226
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1289
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1314
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1315
var lifecycles = app.
Services
.GetServices<IDistributedApplicationLifecycleHook>();
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
168
var eventing = app.
Services
.GetRequiredService<IDistributedApplicationEventing>();
ExternalServiceTests.cs (4)
167
var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, DistributedApplicationOperation.Publish, app.
Services
).DefaultTimeout();
392
var healthCheckService = app.
Services
.GetService<HealthCheckService>();
413
var healthCheckService = app.
Services
.GetService<HealthCheckService>();
430
var healthCheckService = app.
Services
.GetRequiredService<HealthCheckService>();
Health\ResourceHealthCheckServiceTests.cs (6)
158
var healthService = app.
Services
.GetRequiredService<ResourceHealthCheckService>();
221
var logger = app.
Services
.GetRequiredService<ILogger<ResourceHealthCheckServiceTests>>();
222
var rhcs = app.
Services
.GetRequiredService<ResourceHealthCheckService>();
261
var logger = app.
Services
.GetRequiredService<ILogger<ResourceHealthCheckServiceTests>>();
262
var rhcs = app.
Services
.GetRequiredService<ResourceHealthCheckService>();
482
var rhcs = app.
Services
.GetRequiredService<ResourceHealthCheckService>();
HealthCheckTests.cs (2)
101
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
139
var collector = app.
Services
.GetFakeLogCollector();
Helpers\JsonDocumentManifestPublisher.cs (1)
44
var publisher = testProgram.App?.
Services
.GetRequiredKeyedService<IDistributedApplicationPublisher>("manifest") as JsonDocumentManifestPublisher;
KestrelConfigTests.cs (1)
359
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
ManifestGenerationTests.cs (1)
120
var publisher = program.
Services
.GetManifestPublisher();
Orchestrator\ApplicationOrchestratorTests.cs (10)
27
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
74
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
119
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
169
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
236
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
288
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
340
var e = Assert.Throws<InvalidOperationException>(() => app.
Services
.GetService<ApplicationOrchestrator>());
358
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
402
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
431
await applicationEventing.PublishAsync(new ConnectionStringAvailableEvent(resource.Resource, app.
Services
), CancellationToken.None);
Orchestrator\RelationshipEvaluatorTests.cs (1)
28
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>();
296
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
316
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
359
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
381
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
406
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
436
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
455
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
479
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
529
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
624
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Publishing\ResourceContainerImageBuilderTests.cs (22)
35
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
39
var collector = app.
Services
.GetFakeLogCollector();
65
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
69
var collector = app.
Services
.GetFakeLogCollector();
103
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
107
var collector = app.
Services
.GetFakeLogCollector();
141
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
145
var collector = app.
Services
.GetFakeLogCollector();
175
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
179
var collector = app.
Services
.GetFakeLogCollector();
212
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
216
var collector = app.
Services
.GetFakeLogCollector();
252
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
256
var collector = app.
Services
.GetFakeLogCollector();
291
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
295
var collector = app.
Services
.GetFakeLogCollector();
327
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
331
var collector = app.
Services
.GetFakeLogCollector();
356
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
362
var collector = app.
Services
.GetFakeLogCollector();
404
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
411
var collector = app.
Services
.GetFakeLogCollector();
PublishingTests.cs (3)
218
var publishingOptions = app.
Services
.GetRequiredService<IOptions<PublishingOptions>>();
229
var publishingOptions = app.
Services
.GetRequiredService<IOptions<PublishingOptions>>();
240
var publishingOptions = app.
Services
.GetRequiredService<IOptions<PublishingOptions>>();
Schema\SchemaTests.cs (1)
226
var publisher = program.
Services
.GetManifestPublisher();
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)
574
var collector = app.
Services
.GetFakeLogCollector();
WithEndpointTests.cs (1)
209
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
WithEnvironmentTests.cs (1)
29
var serviceProvider = app.
Services
.GetRequiredService<IServiceProvider>();
WithHttpCommandTests.cs (1)
30
var httpClientFactory = app.
Services
.GetService<IHttpClientFactory>();
WithUrlsTests.cs (4)
326
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
362
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
444
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
570
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Valkey.Tests (6)
AddValkeyTests.cs (6)
22
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
50
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
79
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
98
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
115
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
333
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Aspire.Playground.Tests (11)
AppHostTests.cs (1)
68
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Infrastructure\DistributedApplicationExtensions.cs (6)
104
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
114
var environment = app.
Services
.GetRequiredService<IHostEnvironment>();
115
var logCollector = app.
Services
.GetFakeLogCollector();
132
var environment = app.
Services
.GetRequiredService<IHostEnvironment>();
133
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
212
var logger = app.
Services
.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(TryApplyEfMigrationsAsync));
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (4)
35
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
78
var hostApplicationLifetime = app.
Services
.GetRequiredService<IHostApplicationLifetime>();
124
var resourceLoggerService = app.
Services
.GetRequiredService<ResourceLoggerService>();
125
var logger = app.
Services
.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(LoggerNotificationExtensions));
TestingAppHost1.AppHost (1)
Program.cs (1)
59
var notifications = app.
Services
.GetRequiredService<ResourceNotificationService>();