Class TerminalConsoleRouter
The default ITerminalRouter<TContext> for console based terminals.
public class TerminalConsoleRouter : ITerminalRouter<TerminalConsoleRouterContext>
- Inheritance
-
TerminalConsoleRouter
- Implements
- Inherited Members
Constructors
TerminalConsoleRouter(ITerminalConsole, IHostApplicationLifetime, ICommandRouter, ITerminalExceptionHandler, TerminalOptions, ILogger<TerminalConsoleRouter>)
Initialize a new TerminalConsoleRouter instance.
public TerminalConsoleRouter(ITerminalConsole terminalConsole, IHostApplicationLifetime applicationLifetime, ICommandRouter commandRouter, ITerminalExceptionHandler exceptionHandler, TerminalOptions options, ILogger<TerminalConsoleRouter> logger)
Parameters
terminalConsole
ITerminalConsoleThe terminal console.
applicationLifetime
IHostApplicationLifetimeThe host application lifetime instance.
commandRouter
ICommandRouterThe command router.
exceptionHandler
ITerminalExceptionHandlerThe exception handler.
options
TerminalOptionsThe configuration options.
logger
ILogger<TerminalConsoleRouter>The logger.
Methods
RunAsync(TerminalConsoleRouterContext)
Runs to the terminal as a console asynchronously.
public virtual Task RunAsync(TerminalConsoleRouterContext context)
Parameters
context
TerminalConsoleRouterContextThe routing service context.