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)
109Services = app.Services, 181Services = app.Services, 306Services = app.Services, 654Services = app.Services, 708Services = app.Services, 1068Services = app.Services, 1149Services = app.Services, 1233Services = app.Services, 1502Services = app.Services, 1566Services = app.Services, 1627Services = app.Services, 1688Services = app.Services, 1823Services = app.Services, 1881Services = app.Services, 1932Services = app.Services, 1944Services = app.Services, 2028Services = app.Services, 2112Services = app.Services, 2206Services = app.Services, 2277Services = app.Services, 2355Services = app.Services, 2369Services = app.Services, 2434Services = app.Services, 2498Services = app.Services, 2552Services = app.Services, 2612Services = app.Services, 2689Services = app.Services, 2703Services = app.Services, 2766Services = app.Services, 2783Services = app.Services, 2864Services = app.Services, 2910Services = app.Services, 2963Services = app.Services, 2977Services = app.Services, 3030Services = app.Services, 3103Services = app.Services, 3156Services = app.Services, 3216Services = app.Services, 3277Services = app.Services, 3347Services = app.Services, 3408Services = app.Services, 3477Services = app.Services, 3534Services = app.Services, 3597Services = app.Services, 3668Services = app.Services, 3723Services = app.Services, 3763Services = app.Services, 3837Services = app.Services, 3885Services = app.Services, 3941Services = app.Services, 4088Services = app.Services, 4167Services = app.Services, 4239Services = app.Services, 4319Services = app.Services, 4393Services = app.Services, 4445Services = app.Services, 4491Services = app.Services, 4537Services = app.Services, 4605Services = app.Services, 4844Services = app.Services, 4896Services = app.Services, 4943Services = app.Services, 4991Services = app.Services, 5129Services = app.Services,
Aspire.Hosting.Blazor.Tests (2)
BlazorHostedExtensionsTests.cs (1)
324Services = services,
WithBlazorAppTests.cs (1)
322Services = services,
Aspire.Hosting.DevTunnels.Tests (3)
DevTunnelResourceBuilderExtensionsTests.cs (3)
574Services = serviceProvider, 626Services = serviceProvider, 674Services = serviceProvider,
Aspire.Hosting.Foundry.Tests (1)
PromptAgentTests.cs (1)
189Services = 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.Tests (1)
ResourceCommandAnnotationTests.cs (1)
201Services = 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,
120 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>(); 406return context.Services.GetRequiredService<IHostApplicationLifetime>().ApplicationStopping;
ApplicationModel\ResourceCommandAnnotation.cs (1)
452get => Services;
ApplicationModel\ResourceCommandService.cs (1)
443Services = context.Services,
ResourceBuilderExtensions.cs (5)
3657var processRunner = context.Services.GetRequiredService<IProcessRunner>(); 3838Services = context.Services, 4087var httpClient = context.Services.GetRequiredService<IHttpClientFactory>().CreateClient(commandOptions.HttpClientName ?? Options.DefaultName); 4100Services = context.Services, 4118Services = 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)
101executeCommand: context => command.ExecuteCommand(context.Services.GetRequiredService<AzureProvisioningController>(), resource.Resource.Name, context), 140context => command.ExecuteCommand(context.Services.GetRequiredService<AzureProvisioningController>(), 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)
854var interactionService = context.Services.GetRequiredService<IInteractionService>();
Aspire.Hosting.EntityFrameworkCore (7)
EFResourceBuilderExtensions.cs (7)
496var notificationService = context.Services.GetRequiredService<ResourceNotificationService>(); 512var executionContext = context.Services.GetService<DistributedApplicationExecutionContext>() 586var resourceLoggerService = context.Services.GetRequiredService<ResourceLoggerService>(); 919var resourceLoggerService = context.Services.GetRequiredService<ResourceLoggerService>(); 920var resourceNotificationService = context.Services.GetRequiredService<ResourceNotificationService>(); 921var interactionService = context.Services.GetService<IInteractionService>(); 947context.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)
1187await ExecuteCommandForAllResourcesAsync(c.Services, KnownResourceCommands.StopCommand, c.CancellationToken); 1196await 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>();