using System;
using System.Windows.Input;
namespace Artemis.UI.Shared;
///
/// Represents a placeholder command that does nothing and can't be executed.
///
public class NullCommand : ICommand
{
private static readonly Lazy _instance = new(() => new NullCommand());
private NullCommand()
{
}
///
/// Gets the static instance of this command.
///
public static ICommand Instance => _instance.Value;
///
public event EventHandler? CanExecuteChanged;
///
public void Execute(object? parameter)
{
throw new InvalidOperationException("NullCommand cannot be executed");
}
///
public bool CanExecute(object? parameter)
{
return false;
}
}