Table of Contents

Interface ICommandContext

Namespace
The.Web.Pages
Assembly
Instagile.Web.Client.dll

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

bool

CanDelete

bool CanDelete { get; }

Property Value

bool

IsRoot

bool IsRoot { get; }

Property Value

bool

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

route string

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

intent ValidationIntent?

Custom intent - defaults to Save.

blockAt MessageLevel

Custom blocking level - defaults to Error.

Returns

Task<bool>

Whether all validation findings are below the specified level.

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

label string

The name of a notional command.

intent ValidationIntent?

Custom intent - defaults to Save.

blockAt MessageLevel

Custom blocking level - defaults to Error.

Returns

Task<bool>

Whether all validation findings are below the specified level.