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, 1093Services = app.Services, 1174Services = app.Services, 1258Services = app.Services, 1527Services = app.Services, 1591Services = app.Services, 1652Services = app.Services, 1713Services = app.Services, 1848Services = app.Services, 1906Services = app.Services, 1957Services = app.Services, 1969Services = app.Services, 2053Services = app.Services, 2137Services = app.Services, 2231Services = app.Services, 2302Services = app.Services, 2380Services = app.Services, 2394Services = app.Services, 2459Services = app.Services, 2523Services = app.Services, 2577Services = app.Services, 2637Services = app.Services, 2714Services = app.Services, 2728Services = app.Services, 2791Services = app.Services, 2808Services = app.Services, 2889Services = app.Services, 2935Services = app.Services, 2988Services = app.Services, 3002Services = app.Services, 3055Services = app.Services, 3128Services = app.Services, 3181Services = app.Services, 3241Services = app.Services, 3302Services = app.Services, 3372Services = app.Services, 3433Services = app.Services, 3502Services = app.Services, 3559Services = app.Services, 3622Services = app.Services, 3693Services = app.Services, 3748Services = app.Services, 3788Services = app.Services, 3862Services = app.Services, 3910Services = app.Services, 3966Services = app.Services, 4113Services = app.Services, 4192Services = app.Services, 4264Services = app.Services, 4344Services = app.Services, 4418Services = app.Services, 4470Services = app.Services, 4516Services = app.Services, 4562Services = app.Services, 4630Services = app.Services, 4869Services = app.Services, 4921Services = app.Services, 4968Services = app.Services, 5016Services = app.Services, 5154Services = 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)
611Services = serviceProvider, 665Services = serviceProvider, 715Services = serviceProvider,
Aspire.Hosting.Foundry.Tests (1)
PromptAgentTests.cs (1)
189Services = 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)
201Services = 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>(); 451return context.Services.GetRequiredService<IHostApplicationLifetime>().ApplicationStopping;
ApplicationModel\ResourceCommandAnnotation.cs (1)
452get => Services;
ApplicationModel\ResourceCommandService.cs (1)
443Services = context.Services,
ResourceBuilderExtensions.cs (5)
3677var processRunner = context.Services.GetRequiredService<IProcessRunner>(); 3858Services = context.Services, 4107var httpClient = context.Services.GetRequiredService<IHttpClientFactory>().CreateClient(commandOptions.HttpClientName ?? Options.DefaultName); 4120Services = context.Services, 4138Services = 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)
431var 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)
861var 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>();