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