コード例 #1
0
        protected TaskLoaderCommandBase(ITaskLoaderNotifier notifier, Func <object, bool> canExecute = null, bool autoRaiseCanExecuteChange = false)
        {
            Notifier    = notifier;
            _canExecute = canExecute;

            AutoRaiseCanExecuteChange = autoRaiseCanExecuteChange;

            if (_canExecute != null)
            {
                CanBeExecuted = CanExecute(null);
            }
        }
コード例 #2
0
        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);
            }
        }