protected TaskLoaderCommandBase(ITaskLoaderNotifier notifier, Func <object, bool> canExecute = null, bool autoRaiseCanExecuteChange = false) { Notifier = notifier; _canExecute = canExecute; AutoRaiseCanExecuteChange = autoRaiseCanExecuteChange; if (_canExecute != null) { CanBeExecuted = CanExecute(null); } }
protected TaskLoaderCommandBase(ITaskLoaderNotifier notifier, Func <object, bool> canExecute = null, bool autoRaiseCanExecuteChange = false) { Notifier = notifier; _canExecute = canExecute; AutoRaiseCanExecuteChange = autoRaiseCanExecuteChange; _synchronizationContext = SynchronizationContext.Current; if (_canExecute != null) { CanBeExecuted = CanExecute(null); } }