Add(TCommand, Func<String[], ValueTask>) Method

Definition

Assembly XenoAtom.CommandLine.dll

Sets an action attached to the specified command.

public static TCommand Add<TCommand>(this TCommand command, Func<string[], ValueTask<int>> action)
    where TCommand : Command

Type parameters

TCommand
Type of the command.

Parameters

command
{TCommand}

The command to add the action to.

action
Func<String[], ValueTask<Int32>>

The action to set for this command.

Returns

{TCommand}
The command.