15 instantiations of ConsoleInteractionService
aspire (2)
Program.cs (2)
1561var consoleInteractionService = new ConsoleInteractionService(consoleEnvironment, executionContext, hostEnvironment, processPathProvider, loggerFactory, logBufferCtx); 1578return new ConsoleInteractionService(consoleEnvironment, executionContext, hostEnvironment, processPathProvider, loggerFactory, logBufferCtx);
Aspire.Cli.Tests (13)
Commands\DashboardRunCommandTests.cs (1)
660var interactionService = new ConsoleInteractionService(
Commands\NewCommandTests.cs (1)
3062var consoleInteractionService = new ConsoleInteractionService(
Commands\RunCommandTests.cs (2)
3139var interactionService = new ConsoleInteractionService( 3578var consoleInteractionService = new ConsoleInteractionService(consoleEnvironment, executionContext, hostEnvironment, processPathProvider, loggerFactory, logBufferContext);
Interaction\ConsoleInteractionServiceTests.cs (4)
34return new ConsoleInteractionService(consoleEnvironment, executionContext, hostEnvironment ?? TestHelpers.CreateInteractiveHostEnvironment(), new EnvironmentProcessPathProvider(), loggerFactory ?? NullLoggerFactory.Instance, new ConsoleLogBufferContext()); 900var interactionService = new ConsoleInteractionService(consoleEnvironment, CreateExecutionContext(), TestHelpers.CreateInteractiveHostEnvironment(), new EnvironmentProcessPathProvider(), NullLoggerFactory.Instance, new ConsoleLogBufferContext()); 934var interactionService = new ConsoleInteractionService(consoleEnvironment, executionContext, TestHelpers.CreateInteractiveHostEnvironment(), new EnvironmentProcessPathProvider(), NullLoggerFactory.Instance, new ConsoleLogBufferContext()); 963var interactionService = new ConsoleInteractionService(consoleEnvironment, executionContext, TestHelpers.CreateInteractiveHostEnvironment(), new EnvironmentProcessPathProvider(), NullLoggerFactory.Instance, new ConsoleLogBufferContext());
Interaction\ExtensionInteractionServiceTests.cs (4)
37var consoleInteractionService = new ConsoleInteractionService( 280var consoleInteractionService = new ConsoleInteractionService( 463var consoleInteractionService = new ConsoleInteractionService( 495var consoleInteractionService = new ConsoleInteractionService(
Utils\CliTestHelper.cs (1)
557return new ConsoleInteractionService(consoleEnvironment, executionContext, hostEnvironment, processPathProvider, loggerFactory, logBufferContext);
119 references to ConsoleInteractionService
aspire (23)
Commands\AgentInitCommand.cs (19)
109supportedSkills, ConsoleInteractionService.AllChoice, ConsoleInteractionService.NoneChoice), 121var selected = ConsoleInteractionService.MatchChoices(value, s_skillChoices, static name => name); 123!string.Equals(value, ConsoleInteractionService.NoneChoice, StringComparison.OrdinalIgnoreCase)) 126value, supportedSkills, ConsoleInteractionService.AllChoice, ConsoleInteractionService.NoneChoice)); 133option.CompletionSources.Add([.. s_skillChoices, ConsoleInteractionService.AllChoice, ConsoleInteractionService.NoneChoice]); 172supportedClients, ConsoleInteractionService.AllChoice, ConsoleInteractionService.NoneChoice), 183var selected = ConsoleInteractionService.MatchChoices(value, clients, static client => client.Id); 185!string.Equals(value, ConsoleInteractionService.NoneChoice, StringComparison.OrdinalIgnoreCase)) 188value, supportedClients, ConsoleInteractionService.AllChoice, ConsoleInteractionService.NoneChoice)); 197new CompletionItem(ConsoleInteractionService.AllChoice), new CompletionItem(ConsoleInteractionService.NoneChoice)]); 369var matchedClients = ConsoleInteractionService.MatchChoices(requestedAgents, _clients, static client => client.Id); 374ConsoleInteractionService.AllChoice, ConsoleInteractionService.NoneChoice));
Commands\ConfigCommand.cs (1)
493if (InteractionService is ConsoleInteractionService consoleService)
Interaction\ExtensionInteractionService.cs (2)
39private readonly ConsoleInteractionService _consoleInteractionService; 54public ExtensionInteractionService(ConsoleInteractionService consoleInteractionService, IExtensionBackchannel backchannel, bool extensionPromptEnabled, ILogger<ExtensionInteractionService> logger)
Program.cs (1)
1561var consoleInteractionService = new ConsoleInteractionService(consoleEnvironment, executionContext, hostEnvironment, processPathProvider, loggerFactory, logBufferCtx);
Aspire.Cli.Tests (96)
Commands\DashboardRunCommandTests.cs (1)
660var interactionService = new ConsoleInteractionService(
Commands\NewCommandTests.cs (1)
3062var consoleInteractionService = new ConsoleInteractionService(
Commands\RunCommandTests.cs (2)
3139var interactionService = new ConsoleInteractionService( 3578var consoleInteractionService = new ConsoleInteractionService(consoleEnvironment, executionContext, hostEnvironment, processPathProvider, loggerFactory, logBufferContext);
Interaction\ConsoleInteractionServiceTests.cs (87)
30private static ConsoleInteractionService CreateInteractionService(IAnsiConsole console, CliExecutionContext? executionContext = null, ICliHostEnvironment? hostEnvironment = null, ILoggerFactory? loggerFactory = null) 41var interactionService = CreateInteractionService(AnsiConsole.Console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 66var interactionService = CreateInteractionService(console); 85var interactionService = CreateInteractionService(AnsiConsole.Console); 97var interactionService = CreateInteractionService(AnsiConsole.Console); 117var interactionService = CreateInteractionService(console); 141var interactionService = CreateInteractionService(console); 165var interactionService = CreateInteractionService(console); 195var interactionService = CreateInteractionService(console); 218var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 237var interactionService = CreateInteractionService(console, executionContext); 269var interactionService = CreateInteractionService(console); 320var interactionService = CreateInteractionService(console, executionContext); 343var interactionService = CreateInteractionService(console, CreateExecutionContext(debugMode: true)); 373var interactionService = CreateInteractionService(console, CreateExecutionContext(consoleLogLevel: consoleLogLevel), loggerFactory: loggerFactory); 394var interactionService = CreateInteractionService(AnsiConsole.Console, CreateExecutionContext(consoleLogLevel: LogLevel.None)); 414var interactionService = CreateInteractionService(console, executionContext); 431var interactionService = CreateInteractionService(AnsiConsole.Console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 443var interactionService = CreateInteractionService(AnsiConsole.Console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 456var interactionService = CreateInteractionService(AnsiConsole.Console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 469var interactionService = CreateInteractionService(AnsiConsole.Console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 489var interactionService = CreateInteractionService(console); 521var interactionService = CreateInteractionService(console); 558var interactionService = CreateInteractionService(console, executionContext); 569var interactionService = CreateInteractionService(AnsiConsole.Console); 580var interactionService = CreateInteractionService(AnsiConsole.Console, executionContext); 591var interactionService = CreateInteractionService(AnsiConsole.Console, executionContext); 598private static int GetInStatus(ConsoleInteractionService service) 600var field = typeof(ConsoleInteractionService).GetField("_inStatus", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); 617var interactionService = CreateInteractionService(console); 631private static (ConsoleInteractionService InteractionService, StringBuilder Output) CreateInteractionServiceWithOutputCapture() 727var interactionService = CreateInteractionService(console); 756var interactionService = CreateInteractionService(console, CreateExecutionContext(logFilePath: logFilePath)); 784var interactionService = CreateInteractionService(console, CreateExecutionContext(logFilePath: logFilePath)); 806var interactionService = CreateInteractionService(console); 829var interactionService = CreateInteractionService(console); 858var interactionService = CreateInteractionService(console); 900var interactionService = new ConsoleInteractionService(consoleEnvironment, CreateExecutionContext(), TestHelpers.CreateInteractiveHostEnvironment(), new EnvironmentProcessPathProvider(), NullLoggerFactory.Instance, new ConsoleLogBufferContext()); 934var interactionService = new ConsoleInteractionService(consoleEnvironment, executionContext, TestHelpers.CreateInteractiveHostEnvironment(), new EnvironmentProcessPathProvider(), NullLoggerFactory.Instance, new ConsoleLogBufferContext()); 963var interactionService = new ConsoleInteractionService(consoleEnvironment, executionContext, TestHelpers.CreateInteractiveHostEnvironment(), new EnvironmentProcessPathProvider(), NullLoggerFactory.Instance, new ConsoleLogBufferContext()); 983var interactionService = CreateInteractionService(console); 1009var interactionService = CreateInteractionService(console); 1035var interactionService = CreateInteractionService(console); 1060var interactionService = CreateInteractionService(console); 1087var interactionService = CreateInteractionService(console, executionContext); 1115var interactionService = CreateInteractionService(console, executionContext); 1142var interactionService = CreateInteractionService(console, executionContext); 1170var interactionService = CreateInteractionService(console, executionContext); 1197var interactionService = CreateInteractionService(console, executionContext); 1226var interactionService = CreateInteractionService(console, executionContext); 1254var interactionService = CreateInteractionService(console); 1342var interactionService = CreateInteractionService(console); 1360var interactionService = CreateInteractionService(console); 1378var interactionService = CreateInteractionService(console); 1395var interactionService = CreateInteractionService(console); 1408var interactionService = CreateInteractionService(console); 1426var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 1439var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 1458var interaction = CreateInteractionService(console, loggerFactory: loggerFactory); 1475var interactionService = CreateInteractionService(console); 1491var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 1507var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 1521var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 1538var interactionService = CreateInteractionService(console); 1556var result = ConsoleInteractionService.MatchChoices("alpha,alpha,beta", choices, c => c); 1569var result = ConsoleInteractionService.MatchChoices("all", choices, c => c); 1580var result = ConsoleInteractionService.MatchChoices("none", choices, c => c); 1591var result = ConsoleInteractionService.MatchChoices("alpha,nonexistent", choices, c => c); 1601var result = ConsoleInteractionService.MatchChoice("id1", choices, c => c.Display); 1664var interactionService = CreateInteractionService(console); 1677var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 1699var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 1725var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 1752var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 1784var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 1810var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 1828var interactionService = CreateInteractionService(console); 1846var interactionService = CreateInteractionService(console); 1901var result = ConsoleInteractionService.MatchChoices("alpha,BETA", choices, c => c); 1914var result = ConsoleInteractionService.MatchChoice("ALPHA", choices, c => c); 1923var interactionService = CreateInteractionService(AnsiConsole.Console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 1935var interactionService = CreateInteractionService(AnsiConsole.Console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 1952var interactionService = CreateInteractionService(console); 1971var interactionService = CreateInteractionService(console); 1990var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 2009var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 2028var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment());
Interaction\ExtensionInteractionServiceTests.cs (4)
37var consoleInteractionService = new ConsoleInteractionService( 280var consoleInteractionService = new ConsoleInteractionService( 463var consoleInteractionService = new ConsoleInteractionService( 495var consoleInteractionService = new ConsoleInteractionService(
TestServices\TestInteractionService.cs (1)
217var matched = ConsoleInteractionService.MatchChoices(value, (bindingChoices ?? choices).ToArray(), choiceFormatter)