docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IRelayCommand<T>

    A generic interface representing a more specific version of IRelayCommand.

    Inherited Members
    IRelayCommand.NotifyCanExecuteChanged()
    ICommand.CanExecute(object)
    ICommand.Execute(object)
    ICommand.CanExecuteChanged
    Namespace: Unity.AppUI.MVVM
    Assembly: Unity.AppUI.MVVM.dll
    Syntax
    public interface IRelayCommand<in T> : IRelayCommand, ICommand
    Type Parameters
    Name Description
    T

    The type used as argument for the interface methods.

    Methods

    CanExecute(T?)

    Provides a strongly-typed variant of ICommand.CanExecute(object).

    Declaration
    bool CanExecute(T? parameter)
    Parameters
    Type Name Description
    T parameter

    The input parameter.

    Returns
    Type Description
    bool

    Whether or not the current command can be executed.

    Remarks

    Use this overload to avoid boxing, if T is a value type.

    Execute(T?)

    Provides a strongly-typed variant of ICommand.Execute(object).

    Declaration
    void Execute(T? parameter)
    Parameters
    Type Name Description
    T parameter

    The input parameter.

    Remarks

    Use this overload to avoid boxing, if T is a value type.

    In This Article
    Back to top
    Copyright © 2025 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)