Table of Contents

Interface ICommand

Namespace
Whim
Assembly
Whim.dll
A command is a function with a unique identifier.
public interface ICommand

Properties

Id

The unique identifier. For example, "whim.core.focus_right_window".
string Id { get; }

Property Value

string

Title

The title of the command. For example, "Focus right window".
string Title { get; }

Property Value

string

Methods

CanExecute()

Indicates whether the command can currently be executed.
bool CanExecute()

Returns

bool

TryExecute()

Tries to execute the command. If the command is not executable (due to the condition not being met), false is returned.
bool TryExecute()

Returns

bool
True if the command was executed, false otherwise.