71 writes to Services
Aspire.Hosting (3)
ApplicationModel\ResourceCommandAnnotation.cs (1)
453
init =>
Services
= value;
ApplicationModel\ResourceCommandService.cs (2)
369
Services
= _serviceProvider,
443
Services
= context.Services,
Aspire.Hosting.Azure.Tests (61)
AzureEnvironmentResourceExtensionsTests.cs (61)
358
Services
= app.Services,
412
Services
= app.Services,
750
Services
= app.Services,
831
Services
= app.Services,
915
Services
= app.Services,
1184
Services
= app.Services,
1248
Services
= app.Services,
1309
Services
= app.Services,
1370
Services
= app.Services,
1505
Services
= app.Services,
1563
Services
= app.Services,
1614
Services
= app.Services,
1626
Services
= app.Services,
1710
Services
= app.Services,
1794
Services
= app.Services,
1888
Services
= app.Services,
1959
Services
= app.Services,
2037
Services
= app.Services,
2051
Services
= app.Services,
2116
Services
= app.Services,
2180
Services
= app.Services,
2234
Services
= app.Services,
2294
Services
= app.Services,
2371
Services
= app.Services,
2385
Services
= app.Services,
2448
Services
= app.Services,
2465
Services
= app.Services,
2546
Services
= app.Services,
2592
Services
= app.Services,
2645
Services
= app.Services,
2659
Services
= app.Services,
2712
Services
= app.Services,
2785
Services
= app.Services,
2838
Services
= app.Services,
2898
Services
= app.Services,
2959
Services
= app.Services,
3029
Services
= app.Services,
3090
Services
= app.Services,
3159
Services
= app.Services,
3216
Services
= app.Services,
3279
Services
= app.Services,
3350
Services
= app.Services,
3405
Services
= app.Services,
3445
Services
= app.Services,
3519
Services
= app.Services,
3567
Services
= app.Services,
3623
Services
= app.Services,
3770
Services
= app.Services,
3849
Services
= app.Services,
3921
Services
= app.Services,
4001
Services
= app.Services,
4075
Services
= app.Services,
4127
Services
= app.Services,
4173
Services
= app.Services,
4219
Services
= app.Services,
4287
Services
= app.Services,
4526
Services
= app.Services,
4578
Services
= app.Services,
4625
Services
= app.Services,
4673
Services
= app.Services,
4811
Services
= app.Services,
Aspire.Hosting.Blazor.Tests (2)
BlazorHostedExtensionsTests.cs (1)
249
Services
= services,
WithBlazorAppTests.cs (1)
322
Services
= services,
Aspire.Hosting.DevTunnels.Tests (3)
DevTunnelResourceBuilderExtensionsTests.cs (3)
470
Services
= serviceProvider,
522
Services
= serviceProvider,
570
Services
= serviceProvider,
Aspire.Hosting.Foundry.Tests (1)
PromptAgentTests.cs (1)
101
Services
= serviceProvider,
Aspire.Hosting.Maui.Tests (1)
MauiBuildQueueTests.cs (1)
779
Services
= env.Services,
85 references to Services
Aspire.Hosting (14)
ApplicationModel\CommandsConfigurationExtensions.cs (7)
30
var orchestrator = context.
Services
.GetRequiredService<ApplicationOrchestrator>();
63
var orchestrator = context.
Services
.GetRequiredService<ApplicationOrchestrator>();
102
var orchestrator = context.
Services
.GetRequiredService<ApplicationOrchestrator>();
204
var orchestrator = context.
Services
.GetRequiredService<ApplicationOrchestrator>();
205
var resourceNotificationService = context.
Services
.GetRequiredService<ResourceNotificationService>();
206
var loggerService = context.
Services
.GetRequiredService<ResourceLoggerService>();
207
var model = context.
Services
.GetRequiredService<DistributedApplicationModel>();
ApplicationModel\ResourceCommandAnnotation.cs (1)
452
get =>
Services
;
ApplicationModel\ResourceCommandService.cs (1)
443
Services = context.
Services
,
ResourceBuilderExtensions.cs (5)
3286
var processRunner = context.
Services
.GetRequiredService<IProcessRunner>();
3467
Services = context.
Services
,
3716
var httpClient = context.
Services
.GetRequiredService<IHttpClientFactory>().CreateClient(commandOptions.HttpClientName ?? Options.DefaultName);
3729
Services = context.
Services
,
3747
Services = context.
Services
,
Aspire.Hosting.Azure (12)
AzureEnvironmentResourceExtensions.cs (1)
57
executeCommand: context => command.ExecuteCommand(context.
Services
.GetRequiredService<AzureProvisioningController>(), context),
AzureProvisioningController.cs (10)
735
var model = context.
Services
.GetRequiredService<DistributedApplicationModel>();
748
var model = context.
Services
.GetRequiredService<DistributedApplicationModel>();
761
var model = context.
Services
.GetRequiredService<DistributedApplicationModel>();
774
var model = context.
Services
.GetRequiredService<DistributedApplicationModel>();
787
var model = context.
Services
.GetRequiredService<DistributedApplicationModel>();
801
var model = context.
Services
.GetRequiredService<DistributedApplicationModel>();
814
var model = context.
Services
.GetRequiredService<DistributedApplicationModel>();
827
var model = context.
Services
.GetRequiredService<DistributedApplicationModel>();
840
var model = context.
Services
.GetRequiredService<DistributedApplicationModel>();
853
var model = context.
Services
.GetRequiredService<DistributedApplicationModel>();
AzureResourcePreparer.cs (1)
80
executeCommand: context => command.ExecuteCommand(context.
Services
.GetRequiredService<AzureProvisioningController>(), resource.Resource.Name, context),
Aspire.Hosting.Azure.Kusto (1)
AzureKustoBuilderExtensions.cs (1)
410
var interactionService = context.
Services
.GetRequiredService<IInteractionService>();
Aspire.Hosting.Blazor (5)
BrowserDebuggerHelper.cs (5)
170
var notificationService = context.
Services
.GetRequiredService<ResourceNotificationService>();
175
var orchestrator = context.
Services
.GetRequiredService<ApplicationOrchestrator>();
182
context.
Services
,
245
var orchestrator = context.
Services
.GetRequiredService<ApplicationOrchestrator>();
255
var notificationService = context.
Services
.GetRequiredService<ResourceNotificationService>();
Aspire.Hosting.Browsers (5)
BrowserLogsBuilderExtensions.cs (5)
158
var configuration = context.
Services
.GetRequiredService<IConfiguration>();
159
var configurationStore = context.
Services
.GetRequiredService<BrowserLogsConfigurationStore>();
162
var sessionManager = context.
Services
.GetRequiredService<IBrowserLogsSessionManager>();
205
var configurationManager = context.
Services
.GetRequiredService<BrowserLogsConfigurationManager>();
239
var sessionManager = context.
Services
.GetRequiredService<IBrowserLogsSessionManager>();
Aspire.Hosting.Browsers.Tests (5)
src\Aspire.Hosting.Browsers\BrowserLogsBuilderExtensions.cs (5)
158
var configuration = context.
Services
.GetRequiredService<IConfiguration>();
159
var configurationStore = context.
Services
.GetRequiredService<BrowserLogsConfigurationStore>();
162
var sessionManager = context.
Services
.GetRequiredService<IBrowserLogsSessionManager>();
205
var configurationManager = context.
Services
.GetRequiredService<BrowserLogsConfigurationManager>();
239
var sessionManager = context.
Services
.GetRequiredService<IBrowserLogsSessionManager>();
Aspire.Hosting.DevTunnels (1)
DevTunnelResourceBuilderExtensions.cs (1)
806
var interactionService = context.
Services
.GetRequiredService<IInteractionService>();
Aspire.Hosting.EntityFrameworkCore (7)
EFResourceBuilderExtensions.cs (7)
410
var notificationService = context.
Services
.GetRequiredService<ResourceNotificationService>();
426
var executionContext = context.
Services
.GetService<DistributedApplicationExecutionContext>()
500
var resourceLoggerService = context.
Services
.GetRequiredService<ResourceLoggerService>();
833
var resourceLoggerService = context.
Services
.GetRequiredService<ResourceLoggerService>();
834
var resourceNotificationService = context.
Services
.GetRequiredService<ResourceNotificationService>();
835
var interactionService = context.
Services
.GetService<IInteractionService>();
863
context.
Services
,
Aspire.Hosting.Tests (3)
ResourceCommandServiceTests.cs (2)
1445
var interactionService = e.
Services
.GetRequiredService<IInteractionService>();
1475
var interactionService = e.
Services
.GetRequiredService<IInteractionService>();
WithProcessCommandTests.cs (1)
391
Assert.NotNull(capturedContext.
Services
);
Stress.AppHost (32)
CommandResources.cs (2)
1110
await ExecuteCommandForAllResourcesAsync(c.
Services
, KnownResourceCommands.StopCommand, c.CancellationToken);
1119
await ExecuteCommandForAllResourcesAsync(c.
Services
, KnownResourceCommands.StartCommand, c.CancellationToken);
InteractionCommands.cs (30)
19
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
37
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
49
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
70
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
107
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
132
var resourceLoggerService = commandContext.
Services
.GetRequiredService<ResourceLoggerService>();
142
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
182
var resourceLoggerService = commandContext.
Services
.GetRequiredService<ResourceLoggerService>();
194
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
268
var resourceLoggerService = commandContext.
Services
.GetRequiredService<ResourceLoggerService>();
280
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
407
var resourceLoggerService = commandContext.
Services
.GetRequiredService<ResourceLoggerService>();
419
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
507
var resourceLoggerService = commandContext.
Services
.GetRequiredService<ResourceLoggerService>();
525
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
566
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
589
var resourceLoggerService = commandContext.
Services
.GetRequiredService<ResourceLoggerService>();
601
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
780
var resourceLoggerService = commandContext.
Services
.GetRequiredService<ResourceLoggerService>();
797
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
826
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
852
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
877
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
900
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
923
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
948
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
989
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
1021
var resourceLoggerService = commandContext.
Services
.GetRequiredService<ResourceLoggerService>();
1034
var interactionService = commandContext.
Services
.GetRequiredService<IInteractionService>();
1065
var resourceLoggerService = commandContext.
Services
.GetRequiredService<ResourceLoggerService>();