Lire en anglais Modifier

Partager via


InvocationContext Class

Definition

Supports command invocation by providing access to parse results and other services.

C#
public sealed class InvocationContext
Inheritance
InvocationContext

Constructors

Properties

BindingContext

The binding context for the current invocation.

Console

The console to which output should be written during the current invocation.

ExitCode

A value that can be used to set the exit code for the process.

HelpBuilder

Enables writing help output.

InvocationResult

The result of the current invocation.

LocalizationResources

Provides localizable strings for help and error messages.

Parser

The parser used to create the ParseResult.

ParseResult

The parse result for the current invocation.

Methods

GetCancellationToken()

Gets token to implement cancellation handling.

Extension Methods

Applies to

Produit Versions
.NET 6 (package-provided), 7 (package-provided), 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)