Table of Contents

Class HostExtensions

Namespace
Microsoft.Extensions.Hosting
Assembly
McMaster.Extensions.Hosting.CommandLine.dll

Extension methods for IHost support.

public static class HostExtensions
Inheritance
object
HostExtensions

Methods

RunCommandLineApplicationAsync(IHost, CancellationToken)

public static Task<int> RunCommandLineApplicationAsync(this IHost host, CancellationToken cancellationToken = default)

Parameters

host IHost

A program abstraction.

cancellationToken CancellationToken

Propagates notification that operations should be canceled.

Returns

Task<int>