/
githubmirror
/
PowerToys
Обзор
Документация
Войти
/
githubmirror
/
PowerToys
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/modules/launcher/PowerLauncher/ViewModel/RelayCommand.cs
35 строк
806 B
Clint Rutkas
[stylecop] Launcher (#5968)
14 авг 2020, 23:35
Не верифицирован
14 авг 2020, 23:35
6514712
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.Windows.Input; namespace PowerLauncher.ViewModel { public class RelayCommand : ICommand { private readonly Action<object> _action; public RelayCommand(Action<object> action) { _action = action; } public virtual bool CanExecute(object parameter) { return true; } public event EventHandler CanExecuteChanged { add { } remove { } } public virtual void Execute(object parameter) { _action?.Invoke(parameter); } } }