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