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