84 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 (61)
AzureEnvironmentResourceExtensionsTests.cs (61)
358Services = app.Services, 412Services = app.Services, 750Services = app.Services, 831Services = app.Services, 915Services = app.Services, 1184Services = app.Services, 1248Services = app.Services, 1309Services = app.Services, 1370Services = app.Services, 1505Services = app.Services, 1563Services = app.Services, 1614Services = app.Services, 1626Services = app.Services, 1710Services = app.Services, 1794Services = app.Services, 1888Services = app.Services, 1959Services = app.Services, 2037Services = app.Services, 2051Services = app.Services, 2116Services = app.Services, 2180Services = app.Services, 2234Services = app.Services, 2294Services = app.Services, 2371Services = app.Services, 2385Services = app.Services, 2448Services = app.Services, 2465Services = app.Services, 2546Services = app.Services, 2592Services = app.Services, 2645Services = app.Services, 2659Services = app.Services, 2712Services = app.Services, 2785Services = app.Services, 2838Services = app.Services, 2898Services = app.Services, 2959Services = app.Services, 3029Services = app.Services, 3090Services = app.Services, 3159Services = app.Services, 3216Services = app.Services, 3279Services = app.Services, 3350Services = app.Services, 3405Services = app.Services, 3445Services = app.Services, 3519Services = app.Services, 3567Services = app.Services, 3623Services = app.Services, 3770Services = app.Services, 3849Services = app.Services, 3921Services = app.Services, 4001Services = app.Services, 4075Services = app.Services, 4127Services = app.Services, 4173Services = app.Services, 4219Services = app.Services, 4287Services = app.Services, 4526Services = app.Services, 4578Services = app.Services, 4625Services = app.Services, 4673Services = app.Services, 4811Services = app.Services,
Aspire.Hosting.Blazor.Tests (2)
BlazorHostedExtensionsTests.cs (1)
270Services = services,
WithBlazorAppTests.cs (1)
322Services = services,
Aspire.Hosting.DevTunnels.Tests (3)
DevTunnelResourceBuilderExtensionsTests.cs (3)
567Services = serviceProvider, 619Services = serviceProvider, 667Services = serviceProvider,
Aspire.Hosting.Foundry.Tests (1)
PromptAgentTests.cs (1)
101Services = serviceProvider,
Aspire.Hosting.Maui.Tests (1)
MauiBuildQueueTests.cs (1)
1153Services = env.Services,
Aspire.Hosting.MongoDB.Tests (2)
tests\Shared\ContainerReplCommandTestBase.cs (2)
86Services = app.Services, 109Services = app.Services,
Aspire.Hosting.MySql.Tests (2)
tests\Shared\ContainerReplCommandTestBase.cs (2)
86Services = app.Services, 109Services = app.Services,
Aspire.Hosting.PostgreSQL.Tests (2)
tests\Shared\ContainerReplCommandTestBase.cs (2)
86Services = app.Services, 109Services = app.Services,
Aspire.Hosting.Redis.Tests (2)
tests\Shared\ContainerReplCommandTestBase.cs (2)
86Services = app.Services, 109Services = app.Services,
Aspire.Hosting.SqlServer.Tests (2)
tests\Shared\ContainerReplCommandTestBase.cs (2)
86Services = app.Services, 109Services = app.Services,
Aspire.Hosting.TestUtilities (1)
Utils\TerminalCommandTestHelpers.cs (1)
25Services = app.Services,
Aspire.Hosting.Valkey.Tests (2)
tests\Shared\ContainerReplCommandTestBase.cs (2)
86Services = app.Services, 109Services = app.Services,
118 references to Services
Aspire.Hosting (14)
ApplicationModel\CommandsConfigurationExtensions.cs (7)
30var orchestrator = context.Services.GetRequiredService<ApplicationOrchestrator>(); 63var orchestrator = context.Services.GetRequiredService<ApplicationOrchestrator>(); 102var orchestrator = context.Services.GetRequiredService<ApplicationOrchestrator>(); 194var orchestrator = context.Services.GetRequiredService<ApplicationOrchestrator>(); 195var resourceNotificationService = context.Services.GetRequiredService<ResourceNotificationService>(); 196var loggerService = context.Services.GetRequiredService<ResourceLoggerService>(); 197var model = context.Services.GetRequiredService<DistributedApplicationModel>();
ApplicationModel\ResourceCommandAnnotation.cs (1)
452get => Services;
ApplicationModel\ResourceCommandService.cs (1)
443Services = context.Services,
ResourceBuilderExtensions.cs (5)
3407var processRunner = context.Services.GetRequiredService<IProcessRunner>(); 3588Services = context.Services, 3837var httpClient = context.Services.GetRequiredService<IHttpClientFactory>().CreateClient(commandOptions.HttpClientName ?? Options.DefaultName); 3850Services = context.Services, 3868Services = context.Services,
Aspire.Hosting.Azure (12)
AzureEnvironmentResourceExtensions.cs (1)
58executeCommand: context => command.ExecuteCommand(context.Services.GetRequiredService<AzureProvisioningController>(), context),
AzureProvisioningController.cs (10)
735var model = context.Services.GetRequiredService<DistributedApplicationModel>(); 748var model = context.Services.GetRequiredService<DistributedApplicationModel>(); 761var model = context.Services.GetRequiredService<DistributedApplicationModel>(); 774var model = context.Services.GetRequiredService<DistributedApplicationModel>(); 787var model = context.Services.GetRequiredService<DistributedApplicationModel>(); 801var model = context.Services.GetRequiredService<DistributedApplicationModel>(); 814var model = context.Services.GetRequiredService<DistributedApplicationModel>(); 827var model = context.Services.GetRequiredService<DistributedApplicationModel>(); 840var model = context.Services.GetRequiredService<DistributedApplicationModel>(); 853var model = context.Services.GetRequiredService<DistributedApplicationModel>();
AzureResourcePreparer.cs (1)
90executeCommand: context => command.ExecuteCommand(context.Services.GetRequiredService<AzureProvisioningController>(), resource.Resource.Name, context),
Aspire.Hosting.Azure.Kusto (1)
AzureKustoBuilderExtensions.cs (1)
410var 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)
841var interactionService = context.Services.GetRequiredService<IInteractionService>();
Aspire.Hosting.EntityFrameworkCore (7)
EFResourceBuilderExtensions.cs (7)
499var notificationService = context.Services.GetRequiredService<ResourceNotificationService>(); 515var executionContext = context.Services.GetService<DistributedApplicationExecutionContext>() 589var resourceLoggerService = context.Services.GetRequiredService<ResourceLoggerService>(); 922var resourceLoggerService = context.Services.GetRequiredService<ResourceLoggerService>(); 923var resourceNotificationService = context.Services.GetRequiredService<ResourceNotificationService>(); 924var interactionService = context.Services.GetService<IInteractionService>(); 950context.Services,
Aspire.Hosting.EntityFrameworkCore.Tests (2)
TestServices\TestEfTool.cs (2)
30context.Services.GetRequiredService<DistributedApplicationExecutionContext>(), 34await 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)
1548var interactionService = e.Services.GetRequiredService<IInteractionService>(); 1578var 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 (33)
CommandResources.cs (2)
1110await ExecuteCommandForAllResourcesAsync(c.Services, KnownResourceCommands.StopCommand, c.CancellationToken); 1119await ExecuteCommandForAllResourcesAsync(c.Services, KnownResourceCommands.StartCommand, c.CancellationToken);
InteractionCommands.cs (31)
19var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 37var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 49var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 70var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 107var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 132var resourceLoggerService = commandContext.Services.GetRequiredService<ResourceLoggerService>(); 142var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 182var resourceLoggerService = commandContext.Services.GetRequiredService<ResourceLoggerService>(); 194var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 268var resourceLoggerService = commandContext.Services.GetRequiredService<ResourceLoggerService>(); 280var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 361var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 488var resourceLoggerService = commandContext.Services.GetRequiredService<ResourceLoggerService>(); 500var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 588var resourceLoggerService = commandContext.Services.GetRequiredService<ResourceLoggerService>(); 606var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 647var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 670var resourceLoggerService = commandContext.Services.GetRequiredService<ResourceLoggerService>(); 682var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 861var resourceLoggerService = commandContext.Services.GetRequiredService<ResourceLoggerService>(); 878var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 907var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 933var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 958var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 981var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 1004var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 1029var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 1070var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 1102var resourceLoggerService = commandContext.Services.GetRequiredService<ResourceLoggerService>(); 1115var interactionService = commandContext.Services.GetRequiredService<IInteractionService>(); 1146var 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>();