From cc4665499b182c32481d506d2e1e65ba41a6370b Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 3 Apr 2013 00:24:35 +0400 Subject: DelegateCommand and ReSharper refactoring --- Juick/Classes/DelegateCommand.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Juick/Classes/DelegateCommand.cs') diff --git a/Juick/Classes/DelegateCommand.cs b/Juick/Classes/DelegateCommand.cs index 40256e5..b9ee13a 100644 --- a/Juick/Classes/DelegateCommand.cs +++ b/Juick/Classes/DelegateCommand.cs @@ -3,27 +3,27 @@ using System.Windows.Input; namespace Juick.Classes { - public class DelegateCommand : ICommand + public class DelegateCommand : ICommand { - readonly Action action; - readonly Func canExecute; + readonly Action _action; + readonly Func _canExecute; - public DelegateCommand(Action execute, Func canExecute) + public DelegateCommand(Action execute, Func canExecute) { - this.action = execute; - this.canExecute = canExecute; + _action = execute; + _canExecute = canExecute; } public bool CanExecute(object parameter) { - return canExecute(); + return _canExecute(); } public event EventHandler CanExecuteChanged; public void Execute(object parameter) { - action(parameter); + _action((T)parameter); } public void NotifyCanExecuteChanged() -- cgit v1.2.3