17 instantiations of ConsoleInteractionService
aspire (2)
Program.cs (2)
1564var consoleInteractionService = new ConsoleInteractionService(consoleEnvironment, executionContext, hostEnvironment, processPathProvider, loggerFactory, logBufferCtx); 1581return new ConsoleInteractionService(consoleEnvironment, executionContext, hostEnvironment, processPathProvider, loggerFactory, logBufferCtx);
Aspire.Cli.Tests (15)
Commands\DashboardRunCommandTests.cs (1)
660var interactionService = new ConsoleInteractionService(
Commands\NewCommandTests.cs (1)
3190var 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)
43return new ConsoleInteractionService(consoleEnvironment, executionContext, hostEnvironment ?? TestHelpers.CreateInteractiveHostEnvironment(), new EnvironmentProcessPathProvider(), loggerFactory ?? NullLoggerFactory.Instance, new ConsoleLogBufferContext()); 1474var interactionService = new ConsoleInteractionService(consoleEnvironment, CreateExecutionContext(), TestHelpers.CreateInteractiveHostEnvironment(), new EnvironmentProcessPathProvider(), NullLoggerFactory.Instance, new ConsoleLogBufferContext()); 1508var interactionService = new ConsoleInteractionService(consoleEnvironment, executionContext, TestHelpers.CreateInteractiveHostEnvironment(), new EnvironmentProcessPathProvider(), NullLoggerFactory.Instance, new ConsoleLogBufferContext()); 1537var interactionService = new ConsoleInteractionService(consoleEnvironment, executionContext, TestHelpers.CreateInteractiveHostEnvironment(), new EnvironmentProcessPathProvider(), NullLoggerFactory.Instance, new ConsoleLogBufferContext());
Interaction\ExtensionInteractionServiceTests.cs (6)
38var consoleInteractionService = new ConsoleInteractionService( 118var consoleInteractionService = new ConsoleInteractionService( 370var consoleInteractionService = new ConsoleInteractionService( 438var consoleInteraction = new ConsoleInteractionService( 614var consoleInteractionService = new ConsoleInteractionService( 646var consoleInteractionService = new ConsoleInteractionService(
Utils\CliTestHelper.cs (1)
556return new ConsoleInteractionService(consoleEnvironment, executionContext, hostEnvironment, processPathProvider, loggerFactory, logBufferContext);
145 references to ConsoleInteractionService
aspire (24)
Commands\AgentInitCommand.cs (20)
115supportedSkills, ConsoleInteractionService.AllChoice, ConsoleInteractionService.NoneChoice), 127var selected = ConsoleInteractionService.MatchChoices(value, s_skillChoices, static name => name); 129!string.Equals(value, ConsoleInteractionService.NoneChoice, StringComparison.OrdinalIgnoreCase)) 132value, supportedSkills, ConsoleInteractionService.AllChoice, ConsoleInteractionService.NoneChoice)); 139option.CompletionSources.Add([.. s_skillChoices, ConsoleInteractionService.AllChoice, ConsoleInteractionService.NoneChoice]); 151supportedClients, ConsoleInteractionService.AllChoice, ConsoleInteractionService.NoneChoice), 162var selected = ConsoleInteractionService.MatchChoices(value, clients, static client => client.Id); 164!string.Equals(value, ConsoleInteractionService.NoneChoice, StringComparison.OrdinalIgnoreCase)) 167value, supportedClients, ConsoleInteractionService.AllChoice, ConsoleInteractionService.NoneChoice)); 176new CompletionItem(ConsoleInteractionService.AllChoice), new CompletionItem(ConsoleInteractionService.NoneChoice)]); 343var matchedClients = ConsoleInteractionService.MatchChoices(requestedAgents, _clients, static client => client.Id); 348ConsoleInteractionService.AllChoice, ConsoleInteractionService.NoneChoice)); 401ConsoleInteractionService.MatchChoices(requestedSkills ?? CommonAgentApplicators.AspireSkillName,
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)
1564var consoleInteractionService = new ConsoleInteractionService(consoleEnvironment, executionContext, hostEnvironment, processPathProvider, loggerFactory, logBufferCtx);
Aspire.Cli.Tests (121)
Commands\DashboardRunCommandTests.cs (1)
660var interactionService = new ConsoleInteractionService(
Commands\NewCommandTests.cs (1)
3190var consoleInteractionService = new ConsoleInteractionService(
Commands\RunCommandTests.cs (2)
3139var interactionService = new ConsoleInteractionService( 3578var consoleInteractionService = new ConsoleInteractionService(consoleEnvironment, executionContext, hostEnvironment, processPathProvider, loggerFactory, logBufferContext);
Interaction\ConsoleInteractionServiceTests.cs (110)
39private static ConsoleInteractionService CreateInteractionService(IAnsiConsole console, CliExecutionContext? executionContext = null, ICliHostEnvironment? hostEnvironment = null, ILoggerFactory? loggerFactory = null) 61var interaction = CreateInteractionService(console); 82var interaction = CreateInteractionService(console); 122var interaction = CreateInteractionService(console, executionContext); 205var interaction = CreateInteractionService(console); 241var interaction = CreateInteractionService(console, context); 283var interaction = CreateInteractionService(console, context); 318var interaction = CreateInteractionService(console, context); 340var interaction = CreateInteractionService(console); 373var interaction = CreateInteractionService(CreateSelectionConsole(new StringBuilder(), keys)); 392var interaction = CreateInteractionService(console); 413var interaction = CreateInteractionService(console); 429var interaction = CreateInteractionService(CreateSelectionConsole(new StringBuilder(), keys)); 443var interaction = CreateInteractionService(CreateSelectionConsole(new StringBuilder(), keys)); 472var label = ConsoleInteractionService.FormatSelectionLabel(markup, width); 484var interaction = CreateInteractionService(console); 506var interaction = CreateInteractionService(console); 529var interaction = CreateInteractionService(console); 546var interaction = CreateInteractionService(console); 575var interaction = CreateInteractionService(CreateSelectionConsole(new StringBuilder(), keys)); 588var interaction = CreateInteractionService(CreateInteractiveConsoleWithInput(output, ""), 605var interaction = CreateInteractionService(CreateInteractiveConsoleWithInput(new StringBuilder(), "")); 615var interactionService = CreateInteractionService(AnsiConsole.Console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 640var interactionService = CreateInteractionService(console); 659var interactionService = CreateInteractionService(AnsiConsole.Console); 671var interactionService = CreateInteractionService(AnsiConsole.Console); 691var interactionService = CreateInteractionService(console); 715var interactionService = CreateInteractionService(console); 739var interactionService = CreateInteractionService(console); 769var interactionService = CreateInteractionService(console); 792var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 811var interactionService = CreateInteractionService(console, executionContext); 843var interactionService = CreateInteractionService(console); 894var interactionService = CreateInteractionService(console, executionContext); 917var interactionService = CreateInteractionService(console, CreateExecutionContext(debugMode: true)); 947var interactionService = CreateInteractionService(console, CreateExecutionContext(consoleLogLevel: consoleLogLevel), loggerFactory: loggerFactory); 968var interactionService = CreateInteractionService(AnsiConsole.Console, CreateExecutionContext(consoleLogLevel: LogLevel.None)); 988var interactionService = CreateInteractionService(console, executionContext); 1005var interactionService = CreateInteractionService(AnsiConsole.Console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 1017var interactionService = CreateInteractionService(AnsiConsole.Console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 1030var interactionService = CreateInteractionService(AnsiConsole.Console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 1043var interactionService = CreateInteractionService(AnsiConsole.Console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 1063var interactionService = CreateInteractionService(console); 1095var interactionService = CreateInteractionService(console); 1132var interactionService = CreateInteractionService(console, executionContext); 1143var interactionService = CreateInteractionService(AnsiConsole.Console); 1154var interactionService = CreateInteractionService(AnsiConsole.Console, executionContext); 1165var interactionService = CreateInteractionService(AnsiConsole.Console, executionContext); 1172private static int GetInStatus(ConsoleInteractionService service) 1174var field = typeof(ConsoleInteractionService).GetField("_inStatus", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); 1191var interactionService = CreateInteractionService(console); 1205private static (ConsoleInteractionService InteractionService, StringBuilder Output) CreateInteractionServiceWithOutputCapture() 1301var interactionService = CreateInteractionService(console); 1330var interactionService = CreateInteractionService(console, CreateExecutionContext(logFilePath: logFilePath)); 1358var interactionService = CreateInteractionService(console, CreateExecutionContext(logFilePath: logFilePath)); 1380var interactionService = CreateInteractionService(console); 1403var interactionService = CreateInteractionService(console); 1432var interactionService = CreateInteractionService(console); 1474var interactionService = new ConsoleInteractionService(consoleEnvironment, CreateExecutionContext(), TestHelpers.CreateInteractiveHostEnvironment(), new EnvironmentProcessPathProvider(), NullLoggerFactory.Instance, new ConsoleLogBufferContext()); 1508var interactionService = new ConsoleInteractionService(consoleEnvironment, executionContext, TestHelpers.CreateInteractiveHostEnvironment(), new EnvironmentProcessPathProvider(), NullLoggerFactory.Instance, new ConsoleLogBufferContext()); 1537var interactionService = new ConsoleInteractionService(consoleEnvironment, executionContext, TestHelpers.CreateInteractiveHostEnvironment(), new EnvironmentProcessPathProvider(), NullLoggerFactory.Instance, new ConsoleLogBufferContext()); 1557var interactionService = CreateInteractionService(console); 1581var interactionService = CreateInteractionService(console); 1642var interactionService = CreateInteractionService(console); 1668var interactionService = CreateInteractionService(console); 1694var interactionService = CreateInteractionService(console); 1719var interactionService = CreateInteractionService(console); 1746var interactionService = CreateInteractionService(console, executionContext); 1774var interactionService = CreateInteractionService(console, executionContext); 1801var interactionService = CreateInteractionService(console, executionContext); 1829var interactionService = CreateInteractionService(console, executionContext); 1856var interactionService = CreateInteractionService(console, executionContext); 1885var interactionService = CreateInteractionService(console, executionContext); 1913var interactionService = CreateInteractionService(console); 2001var interactionService = CreateInteractionService(console); 2019var interactionService = CreateInteractionService(console); 2037var interactionService = CreateInteractionService(console); 2054var interactionService = CreateInteractionService(console); 2067var interactionService = CreateInteractionService(console); 2085var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 2098var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 2117var interaction = CreateInteractionService(console, loggerFactory: loggerFactory); 2134var interactionService = CreateInteractionService(console); 2150var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 2166var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 2180var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 2197var interactionService = CreateInteractionService(console); 2215var result = ConsoleInteractionService.MatchChoices("alpha,alpha,beta", choices, c => c); 2228var result = ConsoleInteractionService.MatchChoices("all", choices, c => c); 2239var result = ConsoleInteractionService.MatchChoices("none", choices, c => c); 2250var result = ConsoleInteractionService.MatchChoices("alpha,nonexistent", choices, c => c); 2260var result = ConsoleInteractionService.MatchChoice("id1", choices, c => c.Display); 2323var interactionService = CreateInteractionService(console); 2336var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 2358var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 2384var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 2411var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 2443var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 2469var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 2487var interactionService = CreateInteractionService(console); 2505var interactionService = CreateInteractionService(console); 2560var result = ConsoleInteractionService.MatchChoices("alpha,BETA", choices, c => c); 2573var result = ConsoleInteractionService.MatchChoice("ALPHA", choices, c => c); 2582var interactionService = CreateInteractionService(AnsiConsole.Console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 2594var interactionService = CreateInteractionService(AnsiConsole.Console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 2611var interactionService = CreateInteractionService(console); 2630var interactionService = CreateInteractionService(console); 2649var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 2668var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment()); 2687var interactionService = CreateInteractionService(console, hostEnvironment: TestHelpers.CreateNonInteractiveHostEnvironment());
Interaction\ExtensionInteractionServiceTests.cs (6)
38var consoleInteractionService = new ConsoleInteractionService( 118var consoleInteractionService = new ConsoleInteractionService( 370var consoleInteractionService = new ConsoleInteractionService( 438var consoleInteraction = new ConsoleInteractionService( 614var consoleInteractionService = new ConsoleInteractionService( 646var consoleInteractionService = new ConsoleInteractionService(
TestServices\TestInteractionService.cs (1)
225var matched = ConsoleInteractionService.MatchChoices(value, (bindingChoices ?? choices).ToArray(), choiceFormatter)