Interface ICommandContext
APIs for Command construction and execution. The context is itself the IProgressHost commands report through: progress and notifications display on every CommandPanel bound to it.
public interface ICommandContext : IProgressHost
- Inherited Members
- Extension Methods
Properties
CanCreate
bool CanCreate { get; }
Property Value
CanDelete
bool CanDelete { get; }
Property Value
IsRoot
bool IsRoot { get; }
Property Value
Methods
OpenModal()
Opens the modal declared by the executing command at its declared route, which must have no parameters.
void OpenModal()
OpenModal(string)
Opens the modal declared by the executing command at a concrete route matching its template.
void OpenModal(string route)
Parameters
routestring
RaiseCanExecuteChanged()
Notifies the context that executability has changed.
void RaiseCanExecuteChanged()
ValidateAsync(ValidationIntent?, MessageLevel)
Run validation for the current command, adding results to the validation session.
Task<bool> ValidateAsync(ValidationIntent? intent = null, MessageLevel blockAt = MessageLevel.Error)
Parameters
intentValidationIntent?Custom intent - defaults to Save.
blockAtMessageLevelCustom blocking level - defaults to Error.
Returns
ValidateAsync(string, ValidationIntent?, MessageLevel)
Run validation for an arbitrary command name, adding results to the validation session.
Task<bool> ValidateAsync(string label, ValidationIntent? intent = null, MessageLevel blockAt = MessageLevel.Error)
Parameters
labelstringThe name of a notional command.
intentValidationIntent?Custom intent - defaults to Save.
blockAtMessageLevelCustom blocking level - defaults to Error.