Click or drag to resize

AsyncRelayCommandTParam Class

A reusable command that encapsulates the implementation of ICommand with support for async/await. Enables instant creation of an ICommand without implementing the ICommand interface for each command. The individual Execute(TParam), ExecuteAsync(TParam) and CanExecute(TParam) members are supplied via delegates.
Inheritance Hierarchy
SystemObject
  BionicCode.Utilities.Net.Core.WpfAsyncRelayCommand
    BionicCode.Utilities.Net.Core.Wpf.GenericAsyncRelayCommandTParam

Namespace:  BionicCode.Utilities.Net.Core.Wpf.Generic
Assembly:  BionicCode.Utilities.Net.Core.Wpf (in BionicCode.Utilities.Net.Core.Wpf.dll) Version: 1.0.2
Syntax
public class AsyncRelayCommand<TParam> : AsyncRelayCommand, 
	IAsyncRelayCommand<TParam>, IAsyncRelayCommand, ICommand

Type Parameters

TParam

[Missing <typeparam name="TParam"/> documentation for "T:BionicCode.Utilities.Net.Core.Wpf.Generic.AsyncRelayCommand`1"]

The AsyncRelayCommandTParam type exposes the following members.

Constructors
  NameDescription
Public methodAsyncRelayCommandTParam(Action)
Creates a new parameterless command that can always execute (CanExecute will always return true).
Public methodAsyncRelayCommandTParam(ActionTParam)
Creates a new command that can always execute (CanExecute(TParam) always returns
true
).
Public methodAsyncRelayCommandTParam(FuncTask)
Creates a new parameterless asynchronous command that can always execute (CanExecute will always return true).
Public methodAsyncRelayCommandTParam(FuncTParam, Task)
Creates a new asynchronous command that can always execute (CanExecute(TParam) always returns
true
).
Public methodAsyncRelayCommandTParam(Action, FuncBoolean)
Creates a new parameterless command.
Public methodAsyncRelayCommandTParam(ActionTParam, PredicateTParam)
Creates a new command.
Public methodAsyncRelayCommandTParam(FuncTask, FuncBoolean)
Creates a parameterless new asynchronous command.
Public methodAsyncRelayCommandTParam(FuncTParam, Task, PredicateTParam)
Creates a new asynchronous command.
Top
Methods
  NameDescription
Public methodCanExecute
Determines whether this AsyncRelayCommand can execute.
(Inherited from AsyncRelayCommand.)
Public methodCanExecute(Object)
Determines whether this AsyncRelayCommand can execute.
(Inherited from AsyncRelayCommand.)
Public methodCanExecute(TParam)
Checks if the ICommand can execute.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExecute
Executes the ICommand on the current command target.
(Inherited from AsyncRelayCommand.)
Public methodExecute(Object)
Executes the AsyncRelayCommand on the current command target.
(Inherited from AsyncRelayCommand.)
Public methodExecute(TParam)
Executes the AsyncRelayCommand on the current command target.
Public methodExecuteAsync
Executes the AsyncRelayCommand on the current command target asynchronously.
(Inherited from AsyncRelayCommand.)
Public methodExecuteAsync(Object)
Executes the AsyncRelayCommand on the current command target asynchronously.
(Inherited from AsyncRelayCommand.)
Public methodExecuteAsync(TParam)
Executes the AsyncRelayCommand on the current command target asynchronously.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Events
  NameDescription
Public eventCanExecuteChanged
Raised when RaiseCanExecuteChanged is called.
(Inherited from AsyncRelayCommand.)
Top
Fields
  NameDescription
Protected fieldCanExecuteNoParam
The registered parameterless CanExecute delegate.
(Inherited from AsyncRelayCommand.)
Protected fieldExecuteAsyncNoParam
The registered parameterless async execute delegate.
(Inherited from AsyncRelayCommand.)
Protected fieldExecuteNoParam
The registered parameterless synchronous execute delegate.
(Inherited from AsyncRelayCommand.)
Top
Extension Methods
Remarks
AsyncRelayCommand<T> implements ICommand.
See Also
https://github.com/BionicCode/BionicCode.Net/blob/master/README.md