{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class AsyncRelayCommand<T> | App UI | 0.5.5
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AsyncRelayCommand<T>

    A generic command that provides a more specific version of AsyncRelayCommand.

    Inheritance
    object
    AsyncRelayCommand<T>
    Implements
    IAsyncRelayCommand<T>
    IAsyncRelayCommand
    INotifyPropertyChanged
    IRelayCommand<T>
    IRelayCommand
    ICommand
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.AppUI.MVVM
    Assembly: solution.dll
    Syntax
    public class AsyncRelayCommand<T> : IAsyncRelayCommand<T>, IAsyncRelayCommand, INotifyPropertyChanged, IRelayCommand<T>, IRelayCommand, ICommand
    Type Parameters
    Name Description
    T

    The type of parameter being passed as input to the callbacks.

    Constructors

    Name Description
    AsyncRelayCommand(Func<T?, CancellationToken, Task>)

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

    AsyncRelayCommand(Func<T?, CancellationToken, Task>, Predicate<T?>)

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

    AsyncRelayCommand(Func<T?, CancellationToken, Task>, Predicate<T?>, AsyncRelayCommandOptions)

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

    AsyncRelayCommand(Func<T?, CancellationToken, Task>, AsyncRelayCommandOptions)

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

    AsyncRelayCommand(Func<T?, Task>)

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

    AsyncRelayCommand(Func<T?, Task>, Predicate<T?>)

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

    AsyncRelayCommand(Func<T?, Task>, Predicate<T?>, AsyncRelayCommandOptions)

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

    AsyncRelayCommand(Func<T?, Task>, AsyncRelayCommandOptions)

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

    Properties

    Name Description
    canBeCancelled

    Gets a value indicating whether this AsyncRelayCommand<T> can be cancelled.

    executionTask

    Gets a value indicating whether this AsyncRelayCommand<T> is currently running.

    isCancellationRequested

    Gets a value indicating whether this AsyncRelayCommand<T> has been cancelled.

    isRunning

    Gets a value indicating whether this AsyncRelayCommand<T> is currently running.

    Methods

    Name Description
    CanExecute(object?)

    Determines whether this AsyncRelayCommand<T> can execute in its current state.

    CanExecute(T?)

    Determines whether this AsyncRelayCommand<T> can execute in its current state.

    Cancel()

    Cancels the current execution of this AsyncRelayCommand<T>.

    Execute(object)

    Determines whether this AsyncRelayCommand<T> can execute in its current state.

    Execute(T?)

    Executes the AsyncRelayCommand<T> synchronously on the current thread.

    ExecuteAsync(object?)

    Gets a value indicating whether this AsyncRelayCommand<T> can be executed.

    ExecuteAsync(T?)

    Occurs when changes occur that affect whether the command should execute.

    NotifyCanExecuteChanged()

    Raises CanExecuteChanged.

    Events

    Name Description
    CanExecuteChanged

    Event raised when the CanExecute(object?) property changes.

    PropertyChanged

    Event raised when the executionTask property changes.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)