static void SafeExecute( this ICommand command, MouseState state, object parameter ) { var args = new MouseCommandArgs { MouseState = state, Parameter = parameter }; if ( command != null && command.CanExecute( args ) ) { command.Execute( args ); } }
static void SafeExecute(this ICommand command, MouseState state, object parameter) { var args = new MouseCommandArgs { MouseState = state, Parameter = parameter }; if (command != null && command.CanExecute(args)) { command.Execute(args); } }