Generated by DocFX

Class RelayCommand

A _command whose sole purpose is to relay its functionality to other objects by invoking delegates. The default return value for the CanExecute(Nullable<Object>) method is true. This type does not allow you to accept _command parameters in the Execute(Nullable<Object>) and CanExecute(Nullable<Object>) callback methods.

Inheritance
System.Object
RelayCommand
Implements
IRelayCommand
ICommand
Namespace: ISynergy.Framework.Mvvm.Commands
Assembly: ISynergy.Framework.Mvvm.dll
Syntax
public sealed class RelayCommand : object, IRelayCommand

Constructors

View Source

RelayCommand(Action)

Initializes a new instance of the RelayCommand class that can always _execute.

Declaration
public RelayCommand(Action execute)
Parameters
Type Name Description
Action execute

The execution logic.

View Source

RelayCommand(Action, Func<Boolean>)

Initializes a new instance of the RelayCommand class.

Declaration
public RelayCommand(Action execute, Func<bool> canExecute)
Parameters
Type Name Description
Action execute

The execution logic.

Func<System.Boolean> canExecute

The execution status logic.

Methods

View Source

CanExecute(Nullable<Object>)

Declaration
public bool CanExecute(object? parameter)
Parameters
Type Name Description
System.Nullable<System.Object> parameter
Returns
Type Description
System.Boolean
View Source

Execute(Nullable<Object>)

Declaration
public void Execute(object? parameter)
Parameters
Type Name Description
System.Nullable<System.Object> parameter
View Source

NotifyCanExecuteChanged()

Notifies that the property has changed.

Declaration
public void NotifyCanExecuteChanged()

Events

View Source

CanExecuteChanged

Declaration
public event EventHandler? CanExecuteChanged
Event Type
Type Description
System.Nullable<EventHandler>

Implements

IRelayCommand
ICommand

Extension Methods

Matrix.Replace<T>(T, Object, Object)
Matrix.IsEqual(Object, Object, Decimal, Decimal)
EntityBaseExtensions.HasProperty(Object, String)
ArrayExtensions.Concatenate<T>(T, T[])
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>, Func<TSource, Boolean>)
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>)
ObjectExtensions.Clone<T>(T)
ObjectExtensions.To<T>(Object)
ObjectExtensions.To(Object, Type)
ObjectExtensions.HasMethod(Object, String)
ObjectExtensions.AddressOf<T>(T)
ReflectionExtensions.GetIdentityValue<T>(T)
ReflectionExtensions.GetIdentityValue<T, TResult>(T)
ReflectionExtensions.GetIdentityProperty<T>(T)
ReflectionExtensions.HasIdentityProperty<T>(T)
ReflectionExtensions.GetPropertyValue<T, TResult>(T, String, TResult)
ReflectionExtensions.GetPropertyInfo<T, TValue>(T, Expression<Func<T, TValue>>)
ReflectionExtensions.GetTitleValue<T>(T)
ReflectionExtensions.HasParentIdentityProperty<T>(T)
ReflectionExtensions.GetParentIdentityProperty<T>(T)
ReflectionExtensions.IsFreeApplication<T>(T)