Class IServiceCollectionExtensions
- Namespace
- OneImlx.Terminal.Extensions
- Assembly
- OneImlx.Terminal.dll
Provides extension methods to register OneImlx.Terminal
services with an IServiceCollection.
public static class IServiceCollectionExtensions
- Inheritance
-
IServiceCollectionExtensions
- Inherited Members
Methods
AddTerminalConsole<TStore, THelp, TException, TConsole>(IServiceCollection, ITerminalTextHandler, Action<TerminalOptions>)
Adds the default OneImlx.Terminal
services for console based terminal applications.
public static ITerminalBuilder AddTerminalConsole<TStore, THelp, TException, TConsole>(this IServiceCollection services, ITerminalTextHandler textHandler, Action<TerminalOptions> setupAction) where TStore : class, ITerminalCommandStore where THelp : class, ITerminalHelpProvider where TException : class, ITerminalExceptionHandler where TConsole : class, ITerminalConsole
Parameters
services
IServiceCollectionThe IServiceCollection to add the services to.
textHandler
ITerminalTextHandlerThe text handler.
setupAction
Action<TerminalOptions>A delegate to configure the TerminalOptions.
Returns
- ITerminalBuilder
A ITerminalBuilder that can be used to further configure the terminal services.
Type Parameters
TStore
The type implementing ITerminalCommandStore.
THelp
The type implementing ITerminalHelpProvider.
TException
The type implementing ITerminalExceptionHandler.
TConsole
The type implementing ITerminalConsole.
Remarks
The console refers to an abstraction of the system console. The console can be a system console, a web console, or a custom console.
AddTerminalDefault<TStore, THelp, TException>(IServiceCollection, ITerminalTextHandler, Action<TerminalOptions>)
Adds the default OneImlx.Terminal
services to build custom terminal interfaces.
public static ITerminalBuilder AddTerminalDefault<TStore, THelp, TException>(this IServiceCollection services, ITerminalTextHandler textHandler, Action<TerminalOptions> setupAction) where TStore : class, ITerminalCommandStore where THelp : class, ITerminalHelpProvider where TException : class, ITerminalExceptionHandler
Parameters
services
IServiceCollectionThe IServiceCollection to add the services to.
textHandler
ITerminalTextHandlerThe text handler.
setupAction
Action<TerminalOptions>A delegate to configure the TerminalOptions.
Returns
- ITerminalBuilder
A ITerminalBuilder that can be used to further configure the terminal services.
Type Parameters
TStore
The type implementing ITerminalCommandStore.
THelp
The type implementing ITerminalHelpProvider.
TException
The type implementing ITerminalExceptionHandler.
AddTerminal<TStore>(IServiceCollection, ITerminalTextHandler)
Adds the OneImlx.Terminal
services to the specified IServiceCollection.
public static ITerminalBuilder AddTerminal<TStore>(this IServiceCollection services, ITerminalTextHandler textHandler) where TStore : class, ITerminalCommandStore
Parameters
services
IServiceCollectionThe IServiceCollection to add the services to.
textHandler
ITerminalTextHandlerThe text handler.
Returns
- ITerminalBuilder
A ITerminalBuilder that can be used to further configure the terminal services.
Type Parameters
TStore
The type implementing ITerminalCommandStore.
AddTerminal<TStore>(IServiceCollection, ITerminalTextHandler, IConfiguration)
Adds the OneImlx.Terminal
services to the specified IServiceCollection.
public static ITerminalBuilder AddTerminal<TStore>(this IServiceCollection services, ITerminalTextHandler textHandler, IConfiguration configuration) where TStore : class, ITerminalCommandStore
Parameters
services
IServiceCollectionThe IServiceCollection to add the services to.
textHandler
ITerminalTextHandlerThe text handler.
configuration
IConfigurationThe configuration to bind to TerminalOptions.
Returns
- ITerminalBuilder
A ITerminalBuilder that can be used to further configure the terminal services.
Type Parameters
TStore
The type implementing ITerminalCommandStore.
AddTerminal<TStore>(IServiceCollection, ITerminalTextHandler, Action<TerminalOptions>)
Adds the OneImlx.Terminal
services to the specified IServiceCollection.
public static ITerminalBuilder AddTerminal<TStore>(this IServiceCollection services, ITerminalTextHandler textHandler, Action<TerminalOptions> setupAction) where TStore : class, ITerminalCommandStore
Parameters
services
IServiceCollectionThe IServiceCollection to add the services to.
textHandler
ITerminalTextHandlerThe text handler.
setupAction
Action<TerminalOptions>A delegate to configure the TerminalOptions.
Returns
- ITerminalBuilder
A ITerminalBuilder that can be used to further configure the terminal services.
Type Parameters
TStore
The type implementing ITerminalCommandStore.