Table of Contents

Class Command

Namespace
The.Web.Pages
Assembly
Instagile.Web.Client.dll
public class Command
Inheritance
Command
Derived
Inherited Members

Constructors

Command(Func<string>, Action, Func<bool>?, Func<IServices, bool>?, string, bool)

public Command(Func<string> getLabel, Action execute, Func<bool>? canExecute = null, Func<IServices, bool>? isVisible = null, string key = "", bool primary = false)

Parameters

getLabel Func<string>
execute Action
canExecute Func<bool>
isVisible Func<IServices, bool>
key string
primary bool

Command(Func<string>, Func<IServiceProvider, Task>, Func<bool>?, Func<Task<bool>>?, Func<IServices, bool>?, Func<IServices, Task<bool>>?, string, bool)

protected Command(Func<string> getLabel, Func<IServiceProvider, Task> execute, Func<bool>? canExecute, Func<Task<bool>>? canExecuteAsync, Func<IServices, bool>? isVisible, Func<IServices, Task<bool>>? isVisibleAsync, string key, bool primary)

Parameters

getLabel Func<string>
execute Func<IServiceProvider, Task>
canExecute Func<bool>
canExecuteAsync Func<Task<bool>>
isVisible Func<IServices, bool>
isVisibleAsync Func<IServices, Task<bool>>
key string
primary bool

Command(Func<string>, Func<Task>, Func<bool>?, Func<IServices, bool>?, string, bool)

public Command(Func<string> getLabel, Func<Task> execute, Func<bool>? canExecute = null, Func<IServices, bool>? isVisible = null, string key = "", bool primary = false)

Parameters

getLabel Func<string>
execute Func<Task>
canExecute Func<bool>
isVisible Func<IServices, bool>
key string
primary bool

Command(Func<string>, Func<Task>, Func<Task<bool>>, Func<IServices, Task<bool>>?, string, bool)

public Command(Func<string> getLabel, Func<Task> execute, Func<Task<bool>> canExecute, Func<IServices, Task<bool>>? isVisible = null, string key = "", bool primary = false)

Parameters

getLabel Func<string>
execute Func<Task>
canExecute Func<Task<bool>>
isVisible Func<IServices, Task<bool>>
key string
primary bool

Command(string, Action, Func<bool>?, Func<IServices, bool>?, string, bool)

public Command(string label, Action execute, Func<bool>? canExecute = null, Func<IServices, bool>? isVisible = null, string key = "", bool primary = false)

Parameters

label string
execute Action
canExecute Func<bool>
isVisible Func<IServices, bool>
key string
primary bool

Command(string, Func<Task>, Func<bool>?, Func<IServices, bool>?, string, bool)

public Command(string label, Func<Task> execute, Func<bool>? canExecute = null, Func<IServices, bool>? isVisible = null, string key = "", bool primary = false)

Parameters

label string
execute Func<Task>
canExecute Func<bool>
isVisible Func<IServices, bool>
key string
primary bool

Command(string, Func<Task>, Func<Task<bool>>, Func<IServices, Task<bool>>?, string, bool)

public Command(string label, Func<Task> execute, Func<Task<bool>> canExecute, Func<IServices, Task<bool>>? isVisible = null, string key = "", bool primary = false)

Parameters

label string
execute Func<Task>
canExecute Func<Task<bool>>
isVisible Func<IServices, Task<bool>>
key string
primary bool

Properties

CanAlwaysExecute

public bool CanAlwaysExecute { get; }

Property Value

bool

IsAlwaysVisible

public bool IsAlwaysVisible { get; }

Property Value

bool

IsPrimary

public bool IsPrimary { get; }

Property Value

bool

Key

public string Key { get; }

Property Value

string

Label

public string Label { get; }

Property Value

string

Methods

CanExecute()

public Task<bool> CanExecute()

Returns

Task<bool>

Enable(Func<bool>)

public Command Enable(Func<bool> canExecute)

Parameters

canExecute Func<bool>

Returns

Command

Enable(Func<Task<bool>>)

public Command Enable(Func<Task<bool>> canExecute)

Parameters

canExecute Func<Task<bool>>

Returns

Command

ExecuteAsync(IServiceProvider, Action<Exception>, Func<Command, Task<ValidationResults>>?)

public Task ExecuteAsync(IServiceProvider provider, Action<Exception> onError, Func<Command, Task<ValidationResults>>? onValidate = null)

Parameters

provider IServiceProvider
onError Action<Exception>
onValidate Func<Command, Task<ValidationResults>>

Returns

Task

IsVisible(IServices)

public Task<bool> IsVisible(IServices services)

Parameters

services IServices

Returns

Task<bool>

Rename(Func<string>)

public Command Rename(Func<string> getLabel)

Parameters

getLabel Func<string>

Returns

Command

Rename(string)

public Command Rename(string label)

Parameters

label string

Returns

Command

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

VisibleWhen(Func<IServices, bool>)

public Command VisibleWhen(Func<IServices, bool> isVisible)

Parameters

isVisible Func<IServices, bool>

Returns

Command

VisibleWhen(Func<IServices, Task<bool>>)

public Command VisibleWhen(Func<IServices, Task<bool>> isVisible)

Parameters

isVisible Func<IServices, Task<bool>>

Returns

Command

WithKey(string)

public Command WithKey(string key)

Parameters

key string

Returns

Command

WithPrimary(bool)

public Command WithPrimary(bool primary)

Parameters

primary bool

Returns

Command

Wrap(Func<Func<Task>, Func<Task>>)

public Command Wrap(Func<Func<Task>, Func<Task>> wrapExecute)

Parameters

wrapExecute Func<Func<Task>, Func<Task>>

Returns

Command

Wrap<T>(Func<Func<Task>, T, Func<Task>>)

public Command Wrap<T>(Func<Func<Task>, T, Func<Task>> wrapExecute) where T : notnull

Parameters

wrapExecute Func<Func<Task>, T, Func<Task>>

Returns

Command

Type Parameters

T

Wrap<T1, T2>(Func<Func<Task>, T1, T2, Func<Task>>)

public Command Wrap<T1, T2>(Func<Func<Task>, T1, T2, Func<Task>> wrapExecute) where T1 : notnull where T2 : notnull

Parameters

wrapExecute Func<Func<Task>, T1, T2, Func<Task>>

Returns

Command

Type Parameters

T1
T2

Wrap<T1, T2, T3>(Func<Func<Task>, T1, T2, T3, Func<Task>>)

public Command Wrap<T1, T2, T3>(Func<Func<Task>, T1, T2, T3, Func<Task>> wrapExecute) where T1 : notnull where T2 : notnull where T3 : notnull

Parameters

wrapExecute Func<Func<Task>, T1, T2, T3, Func<Task>>

Returns

Command

Type Parameters

T1
T2
T3

Events

Executed

public event Action? Executed

Event Type

Action