Table of Contents

Interface IExecuteHandler

Namespace
McMaster.Extensions.CommandLineUtils.SourceGeneration
Assembly
McMaster.Extensions.CommandLineUtils.dll

Handles execution of the OnExecute/OnExecuteAsync method without reflection.

public interface IExecuteHandler

Properties

IsAsync

Whether this is an async handler (OnExecuteAsync vs OnExecute).

bool IsAsync { get; }

Property Value

bool

Methods

InvokeAsync(object, CommandLineApplication, CancellationToken)

Invokes the execute method on the model.

Task<int> InvokeAsync(object model, CommandLineApplication app, CancellationToken cancellationToken)

Parameters

model object

The model instance.

app CommandLineApplication

The command line application.

cancellationToken CancellationToken

A cancellation token.

Returns

Task<int>

The exit code.