Implemented interface member:
property
Services
Microsoft.Extensions.Hosting.IHost.Services
561 references to Services
Aspire.Hosting (2)
DistributedApplication.cs (1)
235
/// exposes a <see cref="
Services
"/> property which allows developers to get services from the
DistributedApplicationBuilder.cs (1)
574
_executionContextOptions.ServiceProvider = application.
Services
.GetRequiredService<IServiceProvider>();
Aspire.Hosting.Azure.Kusto.Tests (7)
KustoFunctionalTests.cs (7)
55
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
106
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
185
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
189
var snapshot = app.
Services
.GetRequiredService<FakeLogCollector>().GetSnapshot();
212
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
220
var snapshot = app.
Services
.GetRequiredService<FakeLogCollector>().GetSnapshot();
251
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Azure.Tests (143)
AzureAIFoundryExtensionsTests.cs (3)
89
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
94
var foundryManager = app.
Services
.GetRequiredService<FoundryLocalManager>();
171
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureAppConfigurationExtensionsTests.cs (1)
23
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureAppServiceTests.cs (11)
36
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
65
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
99
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
136
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
164
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
202
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
239
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
280
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
389
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
411
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
442
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)
81
var eventingServices = app.
Services
.GetServices<IDistributedApplicationEventingSubscriber>();
AzureContainerAppsTests.cs (50)
37
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
71
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
101
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
143
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
175
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
219
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
249
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
320
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
397
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
438
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
468
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
504
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
540
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
578
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
618
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
650
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
683
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
734
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
816
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
859
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
890
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
922
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
951
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
988
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1032
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1073
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1111
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1132
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1151
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1171
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1190
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1209
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1227
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1258
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1314
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1365
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1435
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1457
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1487
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1533
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1652
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1674
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1711
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1752
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1792
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1822
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1860
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1900
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1940
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1977
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>();
AzureDeployerTests.cs (11)
151
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
202
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
250
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
307
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
397
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
575
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
623
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
831
var mockImageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>() as MockImageBuilder;
1001
var deploymentStateManager = app.
Services
.GetRequiredService<IDeploymentStateManager>();
1091
var deploymentStateManager = app.
Services
.GetRequiredService<IDeploymentStateManager>();
1123
var deploymentStateManager = app.
Services
.GetRequiredService<IDeploymentStateManager>();
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>();
316
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>();
AzureKustoExtensionsTests.cs (1)
24
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>();
AzureProvisioningResourceTests.cs (3)
36
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
70
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
103
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureRedisEnterpriseExtensionsTests.cs (1)
39
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>();
135
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
188
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
222
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
261
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
AzureStorageExtensionsTests.cs (1)
635
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)
78
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
RoleAssignmentTests.cs (1)
237
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>();
170
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
204
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
232
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
251
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
300
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
347
var containerResource = Assert.Single(app.
Services
.GetRequiredService<DistributedApplicationModel>().GetContainerResources());
WithDockerfileTests.cs (5)
78
var collector = app.
Services
.GetFakeLogCollector();
209
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
242
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
471
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
542
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 (9)
AddMySqlTests.cs (8)
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
));
363
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
MySqlFunctionalTests.cs (1)
578
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Nats.Tests (4)
AddNatsTests.cs (4)
48
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
81
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
99
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
141
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>();
176
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
198
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
379
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
478
var entries = await createServers.Callback(new() { Model = pgadmin, ServiceProvider = app.
Services
}, CancellationToken.None);
532
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
542
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 (10)
AddPythonAppTests.cs (10)
151
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
187
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
229
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
396
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
429
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
490
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
518
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
540
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
561
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
597
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>();
467
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
496
await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.
Services
));
522
await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.
Services
));
543
await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.
Services
));
695
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 (6)
AddSeqTests.cs (6)
21
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
49
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
78
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
175
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
208
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
238
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)
28
var clientFactory = app.
Services
.GetRequiredService<IHttpClientFactory>();
77
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
118
var lifetime = app.
Services
.GetRequiredService<IHostApplicationLifetime>();
DistributedApplicationTestingBuilder.cs (1)
290
public IServiceProvider Services => innerApp.
Services
;
Aspire.Hosting.Testing.Tests (11)
TestingBuilderTests.cs (4)
102
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
164
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
401
var hostEnvironment = app.
Services
.GetRequiredService<IHostEnvironment>();
417
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 (272)
AddConnectionStringTests.cs (2)
26
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
55
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AddParameterTests.cs (11)
25
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
57
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
93
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
145
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
204
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
273
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
305
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
520
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
544
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
567
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
593
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
AppHostSmokeTests.cs (1)
93
var dcpOptions = host.
Services
.GetRequiredService<IOptions<DcpOptions>>();
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\DashboardOptionsTests.cs (1)
31
var dashboardOptions = app.
Services
.GetRequiredService<IOptions<DashboardOptions>>().Value;
Dashboard\DashboardResourceTests.cs (17)
45
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
73
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
106
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
180
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
221
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
260
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
296
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
334
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
345
var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.
Services
).DefaultTimeout();
380
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
386
var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(dashboard, DistributedApplicationOperation.Run, app.
Services
).DefaultTimeout();
407
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
423
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
474
var resourceLoggerService = app.
Services
.GetRequiredService<ResourceLoggerService>();
488
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
489
var resourceNotificationService = app.
Services
.GetRequiredService<ResourceNotificationService>();
540
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Dcp\DcpCliArgsTests.cs (1)
54
var dcpOptions = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value;
Dcp\DcpExecutorTests.cs (49)
37
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
62
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
146
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
189
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
238
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
270
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
302
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
335
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
372
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
392
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
426
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
460
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
524
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
546
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
582
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
682
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
792
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
837
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
874
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
909
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
969
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
990
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1026
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1063
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1100
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1130
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1167
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1189
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1224
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1264
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1288
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1323
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1359
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1399
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1430
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1461
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1491
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1520
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1568
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1613
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1650
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1691
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1727
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1769
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1811
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1853
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1890
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1927
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
1970
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Dcp\DcpHostNotificationTests.cs (6)
48
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
97
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
152
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
207
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
257
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
321
var applicationModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
DistributedApplicationBuilderTests.cs (10)
39
Assert.NotNull(app.
Services
.GetRequiredKeyedService<IDistributedApplicationPublisher>("manifest"));
41
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
44
var eventingSubscribers = app.
Services
.GetServices<IDistributedApplicationEventingSubscriber>();
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 (46)
133
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
134
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
135
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
176
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
177
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
178
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
251
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
252
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
253
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
328
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
329
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
330
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
488
var logger = app.
Services
.GetRequiredService<ILogger<DistributedApplicationTests>>();
546
var s = app.
Services
.GetRequiredService<IKubernetesService>();
604
var s = app.
Services
.GetRequiredService<IKubernetesService>();
640
var events = app.
Services
.GetRequiredService<IDistributedApplicationEventing>();
647
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
648
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
649
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
690
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
691
var orchestrator = app.
Services
.GetRequiredService<ApplicationOrchestrator>();
692
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
734
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
738
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
785
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
789
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
819
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
823
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
859
var kubernetes = app.
Services
.GetRequiredService<IKubernetesService>();
863
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
894
var s = app.
Services
.GetRequiredService<IKubernetesService>();
896
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
923
var s = app.
Services
.GetRequiredService<IKubernetesService>();
925
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
952
var s = app.
Services
.GetRequiredService<IKubernetesService>();
954
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
982
var s = app.
Services
.GetRequiredService<IKubernetesService>();
984
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1008
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1068
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1087
var suffix = app.
Services
.GetRequiredService<IOptions<DcpOptions>>().Value.ResourceNameSuffix;
1229
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1283
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1350
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1377
var s = app.
Services
.GetRequiredService<IKubernetesService>();
1379
var lifecycles = app.
Services
.GetServices<IDistributedApplicationLifecycleHook>();
Eventing\DistributedApplicationBuilderEventingTests.cs (3)
168
var eventing = app.
Services
.GetRequiredService<IDistributedApplicationEventing>();
293
var eventing = app.
Services
.GetRequiredService<IDistributedApplicationEventing>();
302
var testEvent = new ResourceStoppedEvent(resource.Resource, app.
Services
, testResourceEvent);
ExternalServiceTests.cs (4)
167
var config = await EnvironmentVariableEvaluator.GetEnvironmentVariablesAsync(project.Resource, DistributedApplicationOperation.Publish, app.
Services
).DefaultTimeout();
381
var healthCheckService = app.
Services
.GetService<HealthCheckService>();
402
var healthCheckService = app.
Services
.GetService<HealthCheckService>();
419
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 (15)
32
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
79
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
124
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
174
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
241
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
293
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
345
var e = Assert.Throws<InvalidOperationException>(() => app.
Services
.GetService<ApplicationOrchestrator>());
363
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
407
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
436
await applicationEventing.PublishAsync(new ConnectionStringAvailableEvent(resource.Resource, app.
Services
), CancellationToken.None);
583
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
629
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
677
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
733
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
787
var distributedAppModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Orchestrator\ParameterProcessorTests.cs (11)
494
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
519
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
539
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
565
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
588
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
610
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
635
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
666
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
704
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
708
var parameterProcessor = app.
Services
.GetRequiredService<ParameterProcessor>();
737
var model = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Orchestrator\RelationshipEvaluatorTests.cs (5)
28
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
60
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
83
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
106
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
129
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
ProjectResourceTests.cs (19)
71
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
190
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
217
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
235
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
251
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
301
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
321
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
364
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
386
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
411
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
441
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
460
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
484
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
534
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
636
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
667
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
685
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
703
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
722
var appModel = app.
Services
.GetRequiredService<DistributedApplicationModel>();
Publishing\ResourceContainerImageBuilderTests.cs (35)
35
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
39
var collector = app.
Services
.GetFakeLogCollector();
66
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
70
var collector = app.
Services
.GetFakeLogCollector();
104
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
108
var collector = app.
Services
.GetFakeLogCollector();
142
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
146
var collector = app.
Services
.GetFakeLogCollector();
176
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
180
var collector = app.
Services
.GetFakeLogCollector();
214
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
218
var collector = app.
Services
.GetFakeLogCollector();
255
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
259
var collector = app.
Services
.GetFakeLogCollector();
294
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
298
var collector = app.
Services
.GetFakeLogCollector();
330
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
334
var collector = app.
Services
.GetFakeLogCollector();
359
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
365
var collector = app.
Services
.GetFakeLogCollector();
410
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
416
var collector = app.
Services
.GetFakeLogCollector();
437
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
463
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
485
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
506
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
536
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
568
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
600
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
637
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
644
var collector = app.
Services
.GetFakeLogCollector();
683
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
687
var collector = app.
Services
.GetFakeLogCollector();
756
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
831
var imageBuilder = app.
Services
.GetRequiredService<IResourceContainerImageBuilder>();
PublishingTests.cs (3)
179
var publishingOptions = app.
Services
.GetRequiredService<IOptions<PublishingOptions>>();
190
var publishingOptions = app.
Services
.GetRequiredService<IOptions<PublishingOptions>>();
201
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)
575
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>();
WithOtlpExporterTests.cs (2)
40
var serviceProvider = app.
Services
.GetRequiredService<IServiceProvider>();
63
var serviceProvider = app.
Services
.GetRequiredService<IServiceProvider>();
WithUrlsTests.cs (5)
326
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
362
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
405
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
490
var rns = app.
Services
.GetRequiredService<ResourceNotificationService>();
616
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>();