Commit 07c5189

Jason Lepp <jlepp@arcresources.com>
2010-10-18 19:52:26
Small refactoring on SimpleCommand
1 parent f321ee8
Changed files (2)
src
src/MVPtoMVVM.mvvm/viewmodels/MainWindowViewModel.cs
@@ -2,7 +2,6 @@
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.ComponentModel;
-using System.Diagnostics;
 using System.Linq;
 using System.Linq.Expressions;
 using System.Windows.Input;
src/MVPtoMVVM.mvvm/viewmodels/SimpleCommand.cs
@@ -5,12 +5,10 @@ namespace MVPtoMVVM.mvvm.viewmodels
     public class SimpleCommand : IObservableCommand
     {
         private readonly Action command;
-        private Func<bool> predicate;
+        private readonly Func<bool> predicate;
+        public event EventHandler CanExecuteChanged = (o, e) => { };
 
-        public SimpleCommand(Action command): this(command, () => true)
-        {
-            
-        }
+        public SimpleCommand(Action command): this(command, () => true) {}
 
         public SimpleCommand(Action command, Func<bool> predicate)
         {
@@ -33,6 +31,5 @@ namespace MVPtoMVVM.mvvm.viewmodels
             CanExecuteChanged(this, EventArgs.Empty);
         }
 
-        public event EventHandler CanExecuteChanged = (o,e)=>{};
     }
 }
\ No newline at end of file