Edit

FallbackCommandItem Constructors

FallbackCommandItem(ICommand) Constructor

Definition

Namespace: Microsoft.CommandPalette.Extensions.Toolkit

Initializes a new instance of the FallbackCommandItem class with the provided command and sets its _fallbackHandler property if command implements IFallbackHandler.

public FallbackCommandItem(ICommand command)
        : base(command)
    {
        if (command is IFallbackHandler f)
        {
            _fallbackHandler = f;
        }
    }

Parameters

command ICommand

The command that will be used to create the fallback command item. The command parameter must implement the ICommand interface.