Table of Contents

Constructor AppBuilder

Namespace
Ploch.CommandLine.Spectre
Assembly
Ploch.CommandLine.Spectre.dll

AppBuilder(ConsoleAppInfo, CancellationTokenSource)

Initializes a new instance of the AppBuilder class around a caller-supplied cancellation source.

public AppBuilder(ConsoleAppInfo appInfo, CancellationTokenSource cancellationTokenSource)

Parameters

appInfo ConsoleAppInfo

Metadata describing the application being built.

cancellationTokenSource CancellationTokenSource

The cancellation source to publish to the application's services. It remains the caller's to dispose — Dispose() leaves it alone. Use Create(params IEnumerable<string>) to have the builder own one instead.

Exceptions

ArgumentNullException

Thrown when appInfo or cancellationTokenSource is null.