mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
Remove redundant code
1. remove this 2. auto property should be only 1 line 3. misc 4. part of refactoring for PR #494
This commit is contained in:
@@ -11,11 +11,11 @@ namespace Wox.ViewModel
|
||||
public class BaseViewModel : INotifyPropertyChanged
|
||||
{
|
||||
|
||||
protected virtual void OnPropertyChanged(string propertyName)
|
||||
protected void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
if (null != this.PropertyChanged)
|
||||
if (null != PropertyChanged)
|
||||
{
|
||||
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Wox.ViewModel
|
||||
|
||||
public RelayCommand(Action<object> action)
|
||||
{
|
||||
this._action = action;
|
||||
_action = action;
|
||||
}
|
||||
|
||||
public virtual bool CanExecute(object parameter)
|
||||
@@ -41,9 +41,9 @@ namespace Wox.ViewModel
|
||||
|
||||
public virtual void Execute(object parameter)
|
||||
{
|
||||
if (null != this._action)
|
||||
if (null != _action)
|
||||
{
|
||||
this._action(parameter);
|
||||
_action(parameter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user