Class TerminalConsoleRouter
The default ITerminalRouter<TContext> for console based terminals.
public sealed class TerminalConsoleRouter : ITerminalRouter<TerminalConsoleRouterContext>
- Inheritance
-
TerminalConsoleRouter
- Implements
- Inherited Members
Constructors
TerminalConsoleRouter(ITerminalConsole, ICommandRouter, ITerminalExceptionHandler, TerminalOptions, ILogger<TerminalConsoleRouter>)
Initialize a new TerminalConsoleRouter instance.
public TerminalConsoleRouter(ITerminalConsole terminalConsole, ICommandRouter commandRouter, ITerminalExceptionHandler exceptionHandler, TerminalOptions options, ILogger<TerminalConsoleRouter> logger)
Parameters
terminalConsole
ITerminalConsoleThe terminal console.
commandRouter
ICommandRouterThe command router.
exceptionHandler
ITerminalExceptionHandlerThe exception handler.
options
TerminalOptionsThe configuration options.
logger
ILogger<TerminalConsoleRouter>The logger.
Properties
IsRunning
Gets a value indicating whether the console terminal is running.
public bool IsRunning { get; }
Property Value
Name
The terminal router name.
public string Name { get; }
Property Value
Methods
RunAsync(TerminalConsoleRouterContext)
Runs to the terminal as a console asynchronously.
public Task RunAsync(TerminalConsoleRouterContext context)
Parameters
context
TerminalConsoleRouterContextThe routing service context.