Edytuj

Udostępnij za pośrednictwem


IAsyncRelayCommand<T> Interface

Definition

A generic interface representing a more specific version of IAsyncRelayCommand.

public interface IAsyncRelayCommand<in T> : Microsoft.Toolkit.Mvvm.Input.IAsyncRelayCommand, Microsoft.Toolkit.Mvvm.Input.IRelayCommand<in T>, System.ComponentModel.INotifyPropertyChanged, System.Windows.Input.ICommand
type IAsyncRelayCommand<'T> = interface
    interface IAsyncRelayCommand
    interface IRelayCommand
    interface ICommand
    interface INotifyPropertyChanged
    interface IRelayCommand<'T>
Public Interface IAsyncRelayCommand(Of In T)
Implements IAsyncRelayCommand, ICommand, INotifyPropertyChanged, IRelayCommand(Of In T)

Type Parameters

T

The type used as argument for the interface methods.

This type parameter is contravariant. That is, you can use either the type you specified or any type that is less derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
Derived
Implements

Remarks

This interface is needed to solve the diamond problem with base classes.

Properties

CanBeCanceled

Gets a value indicating whether running operations for this command can be canceled.

(Inherited from IAsyncRelayCommand)
ExecutionTask

Gets the last scheduled Task, if available. This property notifies a change when the Task completes.

(Inherited from IAsyncRelayCommand)
IsCancellationRequested

Gets a value indicating whether a cancelation request has been issued for the current operation.

(Inherited from IAsyncRelayCommand)
IsRunning

Gets a value indicating whether the command currently has a pending operation being executed.

(Inherited from IAsyncRelayCommand)

Methods

Cancel()

Communicates a request for cancelation.

(Inherited from IAsyncRelayCommand)
CanExecute(T)

Provides a strongly-typed variant of CanExecute(Object).

(Inherited from IRelayCommand<T>)
Execute(T)

Provides a strongly-typed variant of Execute(Object).

(Inherited from IRelayCommand<T>)
ExecuteAsync(Object)

Provides a more specific version of Execute(Object), also returning the Task representing the async operation being executed.

(Inherited from IAsyncRelayCommand)
ExecuteAsync(T)

Provides a strongly-typed variant of ExecuteAsync(Object).

NotifyCanExecuteChanged()

Notifies that the CanExecute(Object) property has changed.

(Inherited from IRelayCommand)

Applies to