1 instantiation of ConfigSourceService
Aspire.Cli.Tests (1)
TestServices\TestConfigSourceServices.cs (1)
34
return new
ConfigSourceService
(context, environment ?? new TestEnvironment(), detector ?? new TestConfigSourceDetector(),
146 references to ConfigSourceService
aspire (15)
Backchannel\AppHostConnectionResolver.cs (1)
53
ConfigSourceService
configSources,
Commands\BaseCommand.cs (2)
69
protected
ConfigSourceService
ConfigSources { get; }
197
ConfigSourceService
.DisplayGitOutput(InteractionService, ex.GitOutput);
Commands\CommonCommandServices.cs (2)
21
ConfigSourceService
configSources)
31
public
ConfigSourceService
ConfigSources { get; } = configSources;
Commands\InitCommand.cs (1)
117
Options.Add(
ConfigSourceService
.s_useSourceOption);
Commands\NewCommand.cs (1)
111
Options.Add(
ConfigSourceService
.s_useSourceOption);
Commands\TemplateManagementCommand.cs (2)
86
Options.Add(
ConfigSourceService
.s_useSourceOption);
97
var source = !json || parseResult.GetValue(
ConfigSourceService
.s_useSourceOption) is true
Commands\UpdateCommand.cs (1)
110
Options.Add(
ConfigSourceService
.s_useSourceOption);
Configuration\ConfigSourceService.cs (1)
33
ILogger<
ConfigSourceService
> logger) : IDisposable
Program.cs (1)
335
builder.Services.AddSingleton<
ConfigSourceService
>();
Projects\ProjectLocator.cs (1)
150
ConfigSourceService
configSources) : IProjectLocator
Templating\ConfiguredTemplateSourceService.cs (1)
19
ConfigSourceService
configSources)
Templating\TemplateSourceStore.cs (1)
17
ConfigSourceService
configSources)
Aspire.Cli.Tests (131)
Backchannel\AppHostConnectionResolverTests.cs (2)
40
using
var
sources = TestConfigSourceServices.Create(executionContext, git: git, interaction: interaction);
146
using
var
sources = TestConfigSourceServices.Create(executionContext);
Commands\ConfigSourceCommandTests.cs (23)
66
var
service = provider.GetRequiredService<
ConfigSourceService
>();
114
var
service = provider.GetRequiredService<
ConfigSourceService
>();
161
var
service = provider.GetRequiredService<
ConfigSourceService
>();
249
using
var
sourceService = TestConfigSourceServices.Create(context.ExecutionContext, git: acquired);
419
var
service = provider.GetRequiredService<
ConfigSourceService
>();
524
await provider.GetRequiredService<
ConfigSourceService
>().WaitForChecksAsync().DefaultTimeout();
623
await provider.GetRequiredService<
ConfigSourceService
>().WaitForChecksAsync().DefaultTimeout();
624
var
service = provider.GetRequiredService<
ConfigSourceService
>();
831
Repository = employeeSource ?
ConfigSourceService
.MicrosoftRepository : s_source.Repository,
985
var
initial = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: new TestConfigSourceRepository
1004
var
sources = provider.GetRequiredService<
ConfigSourceService
>();
1042
await provider.GetRequiredService<
ConfigSourceService
>().WaitForChecksAsync().DefaultTimeout();
1331
await provider.GetRequiredService<
ConfigSourceService
>().WaitForChecksAsync().DefaultTimeout();
1357
var
sources = provider.GetRequiredService<
ConfigSourceService
>();
1451
var readmeUrl = microsoftDefault ?
ConfigSourceService
.MicrosoftReadmeUrl : customReadmeUrl;
1467
Repository =
ConfigSourceService
.MicrosoftRepository,
Commands\NewCommandLocalTemplateTests.InitConfig.cs (1)
47
Assert.Equal(
ConfigSourceService
.MicrosoftRepository, source.Repository);
Commands\NewCommandLocalTemplateTests.SourceList.cs (5)
401
Assert.Equal(
ConfigSourceService
.MicrosoftRepository, source.Repository);
450
Assert.Null(omitted.GetValue(
ConfigSourceService
.s_useSourceOption));
455
Assert.Equal(value, explicitValue.GetValue(
ConfigSourceService
.s_useSourceOption));
460
Assert.True(bareFlag.GetValue(
ConfigSourceService
.s_useSourceOption));
486
Assert.Equal(expected, parsed.GetValue(
ConfigSourceService
.s_useSourceOption));
Commands\NewCommandLocalTemplateTests.SourceListGit.cs (2)
74
var previousCache = previousProvider.GetRequiredService<
ConfigSourceService
>().GetCacheDirectory(source);
104
var cache = provider.GetRequiredService<
ConfigSourceService
>().GetCacheDirectory(source);
Configuration\ConfigSourceServiceGitTests.cs (4)
183
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git, clock: clock, interaction: interaction);
415
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(),
443
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(),
687
using
var
service = TestConfigSourceServices.Create(
Configuration\ConfigSourceServiceTests.cs (81)
67
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(),
103
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(),
139
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(),
146
var repository = microsoftDefault ?
ConfigSourceService
.MicrosoftRepository : "https://git.example/configuration";
190
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git, environment: environment);
243
var
service = provider.GetRequiredService<
ConfigSourceService
>();
340
var
service = provider.GetRequiredService<
ConfigSourceService
>();
439
var
service = provider.GetRequiredService<
ConfigSourceService
>();
471
using (
var
first = TestConfigSourceServices.Create(context, git: git, clock: clock))
484
using (
var
service = TestConfigSourceServices.Create(context, git: git, clock: clock, interaction: interaction))
495
using
var
next = TestConfigSourceServices.Create(context, git: git, clock: clock, interaction: interaction);
528
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git, interaction: interaction);
537
using
var
stoppedService = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git);
567
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git, interaction: interaction);
584
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git);
610
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git);
626
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git);
683
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git, interaction: interaction);
828
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git, detector: detector,
849
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git,
861
Assert.Equivalent(detected ? new ConfigSource { Repository =
ConfigSourceService
.MicrosoftRepository, Path = AspireConfigFile.FileName } : null,
873
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git,
885
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git);
919
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(),
940
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(),
944
[CliConfigNames.InitSourceUrl] = explicitSource ?
ConfigSourceService
.MicrosoftRepository : null
972
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(),
994
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), interaction: interaction,
1036
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(),
1069
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(),
1092
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git,
1095
Assert.Equivalent(accepted ? new ConfigSource { Repository =
ConfigSourceService
.MicrosoftRepository, Path = AspireConfigFile.FileName } : new ConfigSource { OptOut = true },
1107
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git,
1124
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git,
1141
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git);
1163
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git);
1191
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git,
1229
var
service = provider.GetRequiredService<
ConfigSourceService
>();
1248
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git,
1269
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git,
1288
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), environment: environment);
1312
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git);
1336
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git);
1357
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git);
1379
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git);
1407
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git);
1437
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git);
1468
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git);
1495
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git);
1539
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git, interaction: interaction);
1569
var
service = TestConfigSourceServices.Create(context, git: git, interaction: interaction);
1589
using
var
first = TestConfigSourceServices.Create(context, git: git, clock: clock);
1613
using
var
service = TestConfigSourceServices.Create(context, git: git, clock: clock, interaction: interaction);
1641
using
var
first = TestConfigSourceServices.Create(context, git: git);
1650
using
var
service = TestConfigSourceServices.Create(context, git: git, interaction: interaction);
1669
var
first = TestConfigSourceServices.Create(context, git: git, clock: clock);
1680
var
next = TestConfigSourceServices.Create(context, git: git, clock: clock, interaction: interaction);
1700
using
var
first = TestConfigSourceServices.Create(context, clock: clock);
1710
using
var
service = TestConfigSourceServices.Create(context, git: git, clock: clock, interaction: interaction);
1753
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(),
1774
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git);
1804
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git, interaction: interaction);
1838
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git);
1886
var
service = TestConfigSourceServices.Create(context, git: git);
1925
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git);
1942
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git);
1965
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git);
2005
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git,
2038
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git, environment: environment);
2059
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git,
2089
using
var
first = TestConfigSourceServices.Create(context, git: git, clock: clock);
2108
using
var
next = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git, clock: clock, interaction: interaction);
2160
var
service = TestConfigSourceServices.Create(context, git: git, interaction: interaction);
2177
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git, interaction: interaction);
2198
using
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(), git: git, detector: detector, interaction: interaction);
2227
var
service = TestConfigSourceServices.Create(workspace.CreateExecutionContext(aspireHomeDirectory: home));
2243
command.Options.Add(
ConfigSourceService
.s_useSourceOption);
Configuration\ConfigurationServiceTests.cs (1)
100
using
var
configSources = TestConfigSourceServices.Create(workspace.CreateExecutionContext());
Interaction\ConsoleInteractionServiceTests.cs (6)
243
using
var
service = TestConfigSourceServices.Create(context, interaction: interaction,
252
command.Options.Add(
ConfigSourceService
.s_useSourceOption);
284
using
var
service = TestConfigSourceServices.Create(context, interaction: interaction, interactive: interactive,
290
command.Options.Add(
ConfigSourceService
.s_useSourceOption);
319
using
var
service = TestConfigSourceServices.Create(context, interaction: interaction,
327
command.Options.Add(
ConfigSourceService
.s_useSourceOption);
TestServices\TestConfigSourceServices.cs (4)
30
public static
ConfigSourceService
Create(CliExecutionContext context, IGitClient? git = null,
37
NullLogger<
ConfigSourceService
>.Instance);
43
using
var
service = Create(TestExecutionContextHelper.CreateExecutionContext(new DirectoryInfo(directory)), git: git, clock: clock);
60
using
var
service = Create(TestExecutionContextHelper.CreateExecutionContext(project), git: git, clock: clock, interaction: interaction);
Utils\CliTestHelper.cs (2)
91
services.AddSingleton<
ConfigSourceService
>();
516
return new ProjectLocator(logger, executionContext, environment, interactionService, configurationService, projectFactory, languageDiscovery, sdkInstaller, appHostCandidateFinder, telemetry, configuration, serviceProvider.GetRequiredService<
ConfigSourceService
>());