Show / Hide Table of Contents

Class SimpleCommand<T>

Strongly typed variant of the SimpleCommand class, that includes type-safe actions or functions for the command parameter.

Inheritance
object
CommandBase
SimpleCommand
SimpleCommand<T>
Implements
ICommand
Inherited Members
SimpleCommand.CanExecute(object)
SimpleCommand.SetCanExecute(bool)
CommandBase.CanExecuteChanged
CommandBase.CanExecute()
CommandBase.Execute(object)
CommandBase.Execute()
CommandBase.TryExecute(object)
CommandBase.TryExecute()
CommandBase.RaiseCanExecuteChanged()
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TheXDS.MCART.Component
Assembly: MCART.Mvvm.dll
Syntax
public class SimpleCommand<T> : SimpleCommand, ICommand
Type Parameters
Name Description
T

Type of command parameter to be used in the command callback.

Constructors

| Edit this page View Source

SimpleCommand(Action<T?>)

Initializes a new instance of the SimpleCommand<T> class.

Declaration
public SimpleCommand(Action<T?> action)
Parameters
Type Name Description
Action<T> action

Action to be executed.

| Edit this page View Source

SimpleCommand(Action<T?>, bool)

Initializes a new instance of the SimpleCommand<T> class.

Declaration
public SimpleCommand(Action<T?> action, bool canExecute)
Parameters
Type Name Description
Action<T> action

Action to be executed.

bool canExecute

Indicates if the command will be executable by default.

| Edit this page View Source

SimpleCommand(Func<T?, Task>)

Initializes a new instance of the SimpleCommand<T> class.

Declaration
public SimpleCommand(Func<T?, Task> task)
Parameters
Type Name Description
Func<T, Task> task

Task to be executed.

| Edit this page View Source

SimpleCommand(Func<T?, Task>, bool)

Initializes a new instance of the SimpleCommand<T> class.

Declaration
public SimpleCommand(Func<T?, Task> task, bool canExecute)
Parameters
Type Name Description
Func<T, Task> task

Task to be executed.

bool canExecute

Indicates if the command will be executable by default.

Implements

ICommand

Extension Methods

Objects.ShallowCopyTo(object, object, Type)
ObjectExtensions.FieldsOf<T>(object)
ObjectExtensions.GetAttribute<T>(object)
ObjectExtensions.GetAttributes<T>(object)
ObjectExtensions.HasAttrValue<TAttribute, TValue>(object, out TValue)
ObjectExtensions.HasAttribute<T>(object)
ObjectExtensions.HasAttribute<T>(object, out T?)
ObjectExtensions.HasAttributes<T>(object, out IEnumerable<T>?)
ObjectExtensions.Is(object?, object?)
ObjectExtensions.IsEither(object, IEnumerable)
ObjectExtensions.IsEither(object, params object[])
ObjectExtensions.IsNeither(object, IEnumerable)
ObjectExtensions.IsNeither(object, params object[])
ObjectExtensions.IsNot(object?, object?)
ObjectExtensions.PropertiesOf<T>(object)
ObjectExtensions.WhichAre(object, IEnumerable<object>)
ObjectExtensions.WhichAre(object, params object[])
Common.IfNotNull<T>(T?, Action<T>)
Objects.Itself<T>(T)
Objects.ShallowCopyTo<T>(T, T)
CollectionExtensions.PushInto<TItem, TCollection>(TItem, ICollection<TCollection>)
DictionaryExtensions.PushInto<TKey, TValue>(TValue, TKey, IDictionary<TKey, TValue>)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX