88 writes to Services
Aspire.Hosting (3)
ApplicationModel\ResourceCommandAnnotation.cs (1)
453init => Services = value;
ApplicationModel\ResourceCommandService.cs (2)
369Services = _serviceProvider, 443Services = context.Services,
Aspire.Hosting.Azure.Tests (64)
AzureEnvironmentResourceExtensionsTests.cs (64)
110Services = app.Services, 182Services = app.Services, 307Services = app.Services, 655Services = app.Services, 709Services = app.Services, 1094Services = app.Services, 1175Services = app.Services, 1259Services = app.Services, 1528Services = app.Services, 1592Services = app.Services, 1653Services = app.Services, 1714Services = app.Services, 1849Services = app.Services, 1907Services = app.Services, 1958Services = app.Services, 1970Services = app.Services, 2054Services = app.Services, 2138Services = app.Services, 2232Services = app.Services, 2303Services = app.Services, 2381Services = app.Services, 2395Services = app.Services, 2460Services = app.Services, 2524Services = app.Services, 2578Services = app.Services, 2638Services = app.Services, 2715Services = app.Services, 2729Services = app.Services, 2792Services = app.Services, 2809Services = app.Services, 2890Services = app.Services, 2936Services = app.Services, 2989Services = app.Services, 3003Services = app.Services, 3056Services = app.Services, 3129Services = app.Services, 3182Services = app.Services, 3242Services = app.Services, 3303Services = app.Services, 3373Services = app.Services, 3434Services = app.Services, 3503Services = app.Services, 3560Services = app.Services, 3623Services = app.Services, 3694Services = app.Services, 3749Services = app.Services, 3789Services = app.Services, 3863Services = app.Services, 3911Services = app.Services, 3967Services = app.Services, 4114Services = app.Services, 4193Services = app.Services, 4265Services = app.Services, 4345Services = app.Services, 4419Services = app.Services, 4471Services = app.Services, 4517Services = app.Services, 4563Services = app.Services, 4631Services = app.Services, 4870Services = app.Services, 4922Services = app.Services, 4969Services = app.Services, 5017Services = app.Services, 5155Services = app.Services,
Aspire.Hosting.Blazor.Tests (2)
BlazorHostedExtensionsTests.cs (1)
305Services = services,
WithBlazorAppTests.cs (1)
323Services = services,
Aspire.Hosting.DevTunnels.Tests (3)
DevTunnelResourceBuilderExtensionsTests.cs (3)
610Services = serviceProvider, 664Services = serviceProvider, 714Services = serviceProvider,
Aspire.Hosting.Foundry.Tests (1)
PromptAgentTests.cs (1)
194Services = serviceProvider,
Aspire.Hosting.Maui.Tests (1)
MauiBuildQueueTests.cs (1)
1176Services = env.Services,
Aspire.Hosting.MongoDB.Tests (2)
tests\Shared\ContainerReplCommandTestBase.cs (2)
87Services = app.Services, 110Services = app.Services,
Aspire.Hosting.MySql.Tests (2)
tests\Shared\ContainerReplCommandTestBase.cs (2)
87Services = app.Services, 110Services = app.Services,
Aspire.Hosting.PostgreSQL.Tests (2)
tests\Shared\ContainerReplCommandTestBase.cs (2)
87Services = app.Services, 110Services = app.Services,
Aspire.Hosting.Redis.Tests (2)
tests\Shared\ContainerReplCommandTestBase.cs (2)
87Services = app.Services, 110Services = app.Services,
Aspire.Hosting.SqlServer.Tests (2)
tests\Shared\ContainerReplCommandTestBase.cs (2)
87Services = app.Services, 110Services = app.Services,
Aspire.Hosting.Tests (1)
ResourceCommandAnnotationTests.cs (1)
204Services = app.Services,
Aspire.Hosting.TestUtilities (1)
Utils\TerminalCommandTestHelpers.cs (1)
25Services = app.Services,
Aspire.Hosting.Valkey.Tests (2)
tests\Shared\ContainerReplCommandTestBase.cs (2)
87Services = app.Services, 110Services = app.Services,
121 references to Services
Aspire.Hosting (15)
ApplicationModel\CommandsConfigurationExtensions.cs (8)
31var orchestrator = context.Services.GetRequiredService<ApplicationOrchestrator>(); 64var orchestrator = context.Services.GetRequiredService<ApplicationOrchestrator>(); 103var orchestrator = context.Services.GetRequiredService<ApplicationOrchestrator>(); 196var orchestrator = context.Services.GetRequiredService<ApplicationOrchestrator>(); 197var resourceNotificationService = context.Services.GetRequiredService<ResourceNotificationService>(); 198var loggerService = context.Services.GetRequiredService<ResourceLoggerService>(); 199var model = context.Services.GetRequiredService<DistributedApplicationModel>(); 452return context.Services.GetRequiredService<IHostApplicationLifetime>().ApplicationStopping;
ApplicationModel\ResourceCommandAnnotation.cs (1)
452get => Services;
ApplicationModel\ResourceCommandService.cs (1)
443Services = context.Services,
ResourceBuilderExtensions.cs (5)
3670var processRunner = context.Services.GetRequiredService<IProcessRunner>(); 3851Services = context.Services, 4100var httpClient = context.Services.GetRequiredService<IHttpClientFactory>().CreateClient(commandOptions.HttpClientName ?? Options.DefaultName); 4113Services = context.Services, 4131Services = context.Services,
Aspire.Hosting.Azure (13)
AzureEnvironmentResourceExtensions.cs (1)
54executeCommand: context => command.ExecuteCommand(context.Services.GetRequiredService<AzureProvisioningController>(), context),
AzureProvisioningController.cs (10)
758var model = context.Services.GetRequiredService<DistributedApplicationModel>(); 771var model = context.Services.GetRequiredService<DistributedApplicationModel>(); 784var model = context.Services.GetRequiredService<DistributedApplicationModel>(); 797var model = context.Services.GetRequiredService<DistributedApplicationModel>(); 814var model = context.Services.GetRequiredService<DistributedApplicationModel>(); 828var model = context.Services.GetRequiredService<DistributedApplicationModel>(); 841var model = context.Services.GetRequiredService<DistributedApplicationModel>(); 854var model = context.Services.GetRequiredService<DistributedApplicationModel>(); 867var model = context.Services.GetRequiredService<DistributedApplicationModel>(); 880var model = context.Services.GetRequiredService<DistributedApplicationModel>();
AzureResourcePreparer.cs (2)
103executeCommand: context => command.ExecuteCommand(context.Services.GetRequiredService<AzureProvisioningController>(), resource.Resource.Name, context), 142context => command.ExecuteCommand(context.Services.GetRequiredService<AzureProvisioningController>(), context),
Aspire.Hosting.Azure.Kusto (1)
AzureKustoBuilderExtensions.cs (1)
435var interactionService = context.Services.GetRequiredService<IInteractionService>();
Aspire.Hosting.Blazor (5)
BrowserDebuggerHelper.cs (5)
170var notificationService = context.Services.GetRequiredService<ResourceNotificationService>(); 175var orchestrator = context.Services.GetRequiredService<ApplicationOrchestrator>(); 182context.Services, 245var orchestrator = context.Services.GetRequiredService<ApplicationOrchestrator>(); 255var notificationService = context.Services.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Browsers (5)
BrowserLogsBuilderExtensions.cs (5)
158var configuration = context.Services.GetRequiredService<IConfiguration>(); 159var configurationStore = context.Services.GetRequiredService<BrowserLogsConfigurationStore>(); 162var sessionManager = context.Services.GetRequiredService<IBrowserLogsSessionManager>(); 205var configurationManager = context.Services.GetRequiredService<BrowserLogsConfigurationManager>(); 239var sessionManager = context.Services.GetRequiredService<IBrowserLogsSessionManager>();
Aspire.Hosting.Browsers.Tests (5)
src\Aspire.Hosting.Browsers\BrowserLogsBuilderExtensions.cs (5)
158var configuration = context.Services.GetRequiredService<IConfiguration>(); 159var configurationStore = context.Services.GetRequiredService<BrowserLogsConfigurationStore>(); 162var sessionManager = context.Services.GetRequiredService<IBrowserLogsSessionManager>(); 205var configurationManager = context.Services.GetRequiredService<BrowserLogsConfigurationManager>(); 239var sessionManager = context.Services.GetRequiredService<IBrowserLogsSessionManager>();
Aspire.Hosting.DevTunnels (1)
DevTunnelResourceBuilderExtensions.cs (1)
859var interactionService = context.Services.GetRequiredService<IInteractionService>();
Aspire.Hosting.EntityFrameworkCore (7)
EFResourceBuilderExtensions.cs (7)
491var notificationService = context.Services.GetRequiredService<ResourceNotificationService>(); 507var executionContext = context.Services.GetService<DistributedApplicationExecutionContext>() 581var resourceLoggerService = context.Services.GetRequiredService<ResourceLoggerService>(); 914var resourceLoggerService = context.Services.GetRequiredService<ResourceLoggerService>(); 915var resourceNotificationService = context.Services.GetRequiredService<ResourceNotificationService>(); 916var interactionService = context.Services.GetService<IInteractionService>(); 942context.Services,
Aspire.Hosting.EntityFrameworkCore.Tests (2)
TestServices\TestEfTool.cs (2)
32context.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 41await context.Services.GetRequiredService<ResourceNotificationService>().PublishUpdateAsync(
Aspire.Hosting.MongoDB (3)
src\Shared\ContainerReplCommand.cs (3)
27var notifications = context.Services.GetRequiredService<ResourceNotificationService>(); 41var runtime = await context.Services.GetRequiredService<IContainerRuntimeResolver>() 47var terminals = context.Services.GetRequiredService<TerminalService>();
Aspire.Hosting.MySql (3)
src\Shared\ContainerReplCommand.cs (3)
27var notifications = context.Services.GetRequiredService<ResourceNotificationService>(); 41var runtime = await context.Services.GetRequiredService<IContainerRuntimeResolver>() 47var terminals = context.Services.GetRequiredService<TerminalService>();
Aspire.Hosting.PostgreSQL (3)
src\Shared\ContainerReplCommand.cs (3)
27var notifications = context.Services.GetRequiredService<ResourceNotificationService>(); 41var runtime = await context.Services.GetRequiredService<IContainerRuntimeResolver>() 47var terminals = context.Services.GetRequiredService<TerminalService>();
Aspire.Hosting.Redis (3)
src\Shared\ContainerReplCommand.cs (3)
27var notifications = context.Services.GetRequiredService<ResourceNotificationService>(); 41var runtime = await context.Services.GetRequiredService<IContainerRuntimeResolver>() 47var terminals = context.Services.GetRequiredService<TerminalService>();
Aspire.Hosting.SqlServer (3)
src\Shared\ContainerReplCommand.cs (3)
27var notifications = context.Services.GetRequiredService<ResourceNotificationService>(); 41var runtime = await context.Services.GetRequiredService<IContainerRuntimeResolver>() 47var terminals = context.Services.GetRequiredService<TerminalService>();
Aspire.Hosting.Tests (3)
ResourceCommandServiceTests.cs (2)
1550var interactionService = e.Services.GetRequiredService<IInteractionService>(); 1580var interactionService = e.Services.GetRequiredService<IInteractionService>();
WithProcessCommandTests.cs (1)
391Assert.NotNull(capturedContext.Services);
Aspire.Hosting.Valkey (3)
src\Shared\ContainerReplCommand.cs (3)
27var notifications = context.Services.GetRequiredService<ResourceNotificationService>(); 41var runtime = await context.Services.GetRequiredService<IContainerRuntimeResolver>() 47var terminals = context.Services.GetRequiredService<TerminalService>();
Stress.AppHost (34)
CommandResources.cs (2)
1188await ExecuteCommandForAllResourcesAsync(c.Services, KnownResourceCommands.StopCommand, c.CancellationToken); 1197await ExecuteCommandForAllResourcesAsync(c.Services, KnownResourceCommands.StartCommand, c.CancellationToken);
InteractionCommands.cs (32)
20var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 38var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 50var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 65var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 86var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 123var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 148var resourceLoggerService = commandContext.Services.GetRequiredService<ResourceLoggerService>(); 158var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 198var resourceLoggerService = commandContext.Services.GetRequiredService<ResourceLoggerService>(); 210var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 284var resourceLoggerService = commandContext.Services.GetRequiredService<ResourceLoggerService>(); 296var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 377var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 504var resourceLoggerService = commandContext.Services.GetRequiredService<ResourceLoggerService>(); 516var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 604var resourceLoggerService = commandContext.Services.GetRequiredService<ResourceLoggerService>(); 622var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 663var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 686var resourceLoggerService = commandContext.Services.GetRequiredService<ResourceLoggerService>(); 698var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 877var resourceLoggerService = commandContext.Services.GetRequiredService<ResourceLoggerService>(); 894var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 923var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 949var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 974var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 997var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 1020var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 1045var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 1086var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 1118var resourceLoggerService = commandContext.Services.GetRequiredService<ResourceLoggerService>(); 1131var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 1162var resourceLoggerService = commandContext.Services.GetRequiredService<ResourceLoggerService>();
Terminals.AppHost (12)
TerminalInteractionCommands.cs (12)
49var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 50var terminalService = commandContext.Services.GetRequiredService<TerminalService>(); 128var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 129var terminalService = commandContext.Services.GetRequiredService<TerminalService>(); 171var terminalService = commandContext.Services.GetRequiredService<TerminalService>(); 217var terminalService = commandContext.Services.GetRequiredService<TerminalService>(); 249var terminalService = commandContext.Services.GetRequiredService<TerminalService>(); 290var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 291var terminalService = commandContext.Services.GetRequiredService<TerminalService>(); 365commandContext.Services.GetRequiredService<ILoggerFactory>() 406var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 407var terminalService = commandContext.Services.GetRequiredService<TerminalService>();