Interface ITerminalCommandStore
A store of CommandDescriptor.
public interface ITerminalCommandStore
Methods
AllAsync()
Returns all CommandDescriptor asynchronously.
Task<CommandDescriptors> AllAsync()
Returns
- Task<CommandDescriptors>
A Dictionary<TKey, TValue> of command descriptors.
TryAddAsync(string, CommandDescriptor)
Adds a CommandDescriptor to the store.
Task<bool> TryAddAsync(string id, CommandDescriptor commandDescriptor)
Parameters
id
stringThe command id.
commandDescriptor
CommandDescriptorThe command descriptor to add.
Returns
TryFindByIdAsync(string, out CommandDescriptor?)
Attempts to finds a CommandDescriptor by its id asynchronously.
Task<bool> TryFindByIdAsync(string id, out CommandDescriptor? commandDescriptor)
Parameters
id
stringThe command id.
commandDescriptor
CommandDescriptorThe CommandDescriptor if found, otherwise
null
Returns
Remarks
This method should never throw an exception. If the command is not found then return false
.