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