16 instantiations of ConsoleEnvironment
aspire (1)
Program.cs (1)
456builder.Services.AddSingleton(s => new ConsoleEnvironment(
Aspire.Cli.Tests (15)
Commands\AgentTelemetryCommandTests.cs (1)
149=> new(
Commands\DashboardRunCommandTests.cs (1)
661new ConsoleEnvironment(console, console, TextReader.Null),
Commands\RunCommandTests.cs (1)
3140new ConsoleEnvironment(console, console, TextReader.Null),
Interaction\ConsoleInteractionServiceTests.cs (4)
42var consoleEnvironment = new ConsoleEnvironment(console, console, TextReader.Null); 1473var consoleEnvironment = new ConsoleEnvironment(stdoutConsole, stderrConsole, TextReader.Null); 1507var consoleEnvironment = new ConsoleEnvironment(stdoutConsole, stderrConsole, TextReader.Null); 1536var consoleEnvironment = new ConsoleEnvironment(stdoutConsole, stderrConsole, TextReader.Null);
Interaction\ExtensionInteractionServiceTests.cs (6)
39new ConsoleEnvironment(console, console, TextReader.Null), 119new ConsoleEnvironment(console, console, TextReader.Null), 371new ConsoleEnvironment(console, console, TextReader.Null), 439new ConsoleEnvironment(inputConsole, inputConsole, TextReader.Null), 615new ConsoleEnvironment(console, console, TextReader.Null), 647new ConsoleEnvironment(console, console, TextReader.Null),
TestHelpers.cs (1)
12new(
Utils\CliTestHelper.cs (1)
426return new ConsoleEnvironment(outConsole, errorConsole, TextReader.Null);
33 references to ConsoleEnvironment
aspire (17)
Commands\AgentTelemetryCommand.cs (2)
38private readonly ConsoleEnvironment _console; 93AgentTelemetryHook hook, IEnvironment environment, ConsoleEnvironment console)
Commands\LsCommand.cs (2)
23private readonly ConsoleEnvironment _consoleEnvironment; 45ConsoleEnvironment consoleEnvironment,
ConsoleEnvironment.cs (1)
14/// Initializes a new instance of the <see cref="ConsoleEnvironment"/> class.
Git\GitCommandRunner.cs (1)
20internal sealed class GitCommandRunner(ICliHostEnvironment hostEnvironment, IInteractionService interaction, ConsoleEnvironment consoleEnvironment, ILogger<GitCommandRunner> logger) : IGitCommandRunner
Interaction\BannerService.cs (1)
45public BannerService(ConsoleEnvironment consoleEnvironment, CliExecutionContext executionContext)
Interaction\ConsoleInteractionService.cs (1)
87public ConsoleInteractionService(ConsoleEnvironment consoleEnvironment, CliExecutionContext executionContext, ICliHostEnvironment hostEnvironment, IProcessPathProvider processPathProvider, ILoggerFactory loggerFactory, ConsoleLogBufferContext logBufferContext)
Program.cs (9)
460builder.Services.AddSingleton(s => s.GetRequiredService<ConsoleEnvironment>().Out); 940var consoleEnvironment = serviceProvider.GetRequiredService<ConsoleEnvironment>(); 969var consoleEnvironment = serviceProvider.GetRequiredService<ConsoleEnvironment>(); 1557var consoleEnvironment = provider.GetRequiredService<ConsoleEnvironment>(); 1575var consoleEnvironment = provider.GetRequiredService<ConsoleEnvironment>();
Aspire.Cli.Tests (16)
Commands\AgentTelemetryCommandTests.cs (1)
148private static ConsoleEnvironment CreateConsole(TextReader input, TextWriter output, TextWriter error)
Commands\NewCommandTests.cs (1)
3191sp.GetRequiredService<ConsoleEnvironment>(),
Commands\RunCommandTests.cs (2)
3572var consoleEnvironment = sp.GetRequiredService<ConsoleEnvironment>();
Git\GitCommandRunnerTests.cs (2)
20private readonly ConsoleEnvironment _consoleEnvironment = TestHelpers.CreateConsoleEnvironment(TextWriter.Null, TextWriter.Null); 280var consoleEnvironment = TestHelpers.CreateConsoleEnvironment(stdout, stderr);
Interaction\ConsoleInteractionServiceTests.cs (4)
42var consoleEnvironment = new ConsoleEnvironment(console, console, TextReader.Null); 1473var consoleEnvironment = new ConsoleEnvironment(stdoutConsole, stderrConsole, TextReader.Null); 1507var consoleEnvironment = new ConsoleEnvironment(stdoutConsole, stderrConsole, TextReader.Null); 1536var consoleEnvironment = new ConsoleEnvironment(stdoutConsole, stderrConsole, TextReader.Null);
TestHelpers.cs (1)
11public static ConsoleEnvironment CreateConsoleEnvironment(TextWriter output, TextWriter error) =>
Utils\CliTestHelper.cs (5)
140services.AddSingleton(sp => sp.GetRequiredService<ConsoleEnvironment>().Out); 218services.AddSingleton(sp => new TrayProtocolOutput(() => sp.GetRequiredService<ConsoleEnvironment>().Out.Profile.Out.Writer)); 418public Func<IServiceProvider, ConsoleEnvironment> ConsoleEnvironmentFactory => (IServiceProvider serviceProvider) => 550var consoleEnvironment = serviceProvider.GetRequiredService<ConsoleEnvironment>();