Skip to content
Documentation

HAKOM.Console.Core.Net Assembly

Provides console abstractions and CLI command infrastructure for HAKOM applications built with System.CommandLine.

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.Console
container.UseConsole();
// Test / captured output: supply explicit streams
var output = new StringWriter();
container.UseConsole(output, TextWriter.Null, TextReader.Null);
Namespaces
HAKOM.Console.Core.Net.Api
HAKOM.Console.Core.Net.Api.Extensions
© 2026 Volue.Version v0.6.38017 November 2026