Class HostExtensions
- Namespace
- Microsoft.Extensions.Hosting
- Assembly
- McMaster.Extensions.Hosting.CommandLine.dll
Extension methods for IHost support.
public static class HostExtensions
- Inheritance
-
objectHostExtensions
Methods
RunCommandLineApplicationAsync(IHost, CancellationToken)
Runs the app using the CommandLineApplication previously configured in UseCommandLineApplication<TApp>(IHostBuilder, string[], Action<CommandLineApplication<TApp>>).
public static Task<int> RunCommandLineApplicationAsync(this IHost host, CancellationToken cancellationToken = default)
Parameters
hostIHostA program abstraction.
cancellationTokenCancellationTokenPropagates notification that operations should be canceled.