Table of Contents

Class CommandHandler

Namespace
AppHealthMonitor
Assembly
AppHealthMonitor.dll

Handles console command input and execution for the daemon. Provides commands for starting, stopping, restarting, querying status, and shutting down monitored applications.

public sealed class CommandHandler
Inheritance
CommandHandler
Inherited Members

Constructors

CommandHandler(DaemonOrchestrator, bool)

Initializes a new instance of the CommandHandler class.

public CommandHandler(DaemonOrchestrator orchestrator, bool headless)

Parameters

orchestrator DaemonOrchestrator

The daemon orchestrator that owns all monitoring state.

headless bool

Whether the daemon is running in headless mode (suppresses console prompt).

Methods

RunAsync()

Runs the console command reader loop using cancellable ReadLineAsync(CancellationToken). Dispatches commands until the daemon is shut down.

public Task RunAsync()

Returns

Task

A task representing the asynchronous command reading operation.