Skip to content

feat: Complete Console API surface coverage for IConsole/ITerminal#22

Merged
StevenTCramer merged 20 commits into
masterfrom
Cramer/2025-12-22/dev
Mar 22, 2026
Merged

feat: Complete Console API surface coverage for IConsole/ITerminal#22
StevenTCramer merged 20 commits into
masterfrom
Cramer/2025-12-22/dev

Conversation

@StevenTCramer
Copy link
Copy Markdown
Contributor

Summary

  • Adds complete System.Console API surface to IConsole and ITerminal interfaces, enabling full replacement of direct Console usage
  • Mirrors all new APIs on the Terminal static facade class
  • Includes comprehensive test doubles (TestConsole/TestTerminal) and unit tests

What Changed

IConsole (new members)

  • Stream access: OpenStandardInput(), OpenStandardOutput(), OpenStandardError(), In, Out, Error, SetIn(), SetOut(), SetError()
  • Encoding: InputEncoding, OutputEncoding
  • Redirection state: IsInputRedirected, IsOutputRedirected, IsErrorRedirected
  • Rich input: Read(), ReadKey() (parameterless overload)

ITerminal (new members)

  • Cursor properties: CursorLeft, CursorTop, CursorVisible, CursorSize
  • Window/buffer geometry: WindowHeight, WindowLeft, WindowTop, BufferWidth, BufferHeight, SetWindowSize(), SetWindowPosition(), SetBufferSize(), MoveBufferArea(), LargestWindowWidth, LargestWindowHeight
  • Color state: ForegroundColor, BackgroundColor, ResetColor()
  • Control/utility: Beep(), Beep(int, int), TreatControlCAsInput, Title, KeyAvailable

Terminal static class

  • All new IConsole/ITerminal members mirrored as static pass-through to Instance

Test implementations

  • TestConsole and TestTerminal updated with mock streams, encoding defaults, character queues, geometry defaults, beep tracking, etc.

Tests

  • 8 new test files with ~160 unit tests covering all new API surface
  • All existing tests continue to pass

Stats

  • +5,691 lines across 28 files
  • 0 build warnings
  • Version bump: 1.0.0-beta.101.0.0-beta.11

@StevenTCramer StevenTCramer merged commit f915e0c into master Mar 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant