Table of Contents

Class Command

Namespace
DuetAPI.Commands
Assembly
DuetAPI.dll

Base class of commands that do not return a result

public abstract class Command : BaseCommand
Inheritance
Command
Derived
Inherited Members

Constructors

Command()

protected Command()

Methods

ExecuteAsync(CancellationToken)

Reserved for the actual command implementation in the control server

public virtual Task ExecuteAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Optional cancellation token

Returns

Task

Asynchronous task

InvokeAsync(CancellationToken)

Invokes the command implementation

public override Task<object?> InvokeAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Optional cancellation token

Returns

Task<object>

null