HAKOM.Console.Core.Net Assembly
Provides console abstractions and CLI command infrastructure for HAKOM applications
built with System.CommandLine.
Remarks
Section titled “Remarks”This assembly wraps System.CommandLine.IConsole with the HAKOM-specific
IConsole interface, which adds typed access to
input/output streams, encoding properties, and window dimensions. The production
implementation delegates to System.Console; an injectable alternative is provided
for testing and redirected-output scenarios.
Key types:
- IConsole — Abstraction over the system console, extending
System.CommandLine.IConsole. - Command — Abstract base class for HAKOM CLI commands; provides access to the injected IConsole.
- ContainerExtensions — Registers console services with the DI container.
Register console support with the container using ContainerExtensions:
using HAKOM.Console.Core.Net.Api.Extensions;
// Production: delegates to System.Consolecontainer.UseConsole();
// Test / captured output: supply explicit streamsvar output = new StringWriter();container.UseConsole(output, TextWriter.Null, TextReader.Null);| Namespaces | |
|---|---|
| HAKOM.Console.Core.Net.Api | |
| HAKOM.Console.Core.Net.Api.Extensions |
Was this page helpful?Thanks for your feedback!