コード例 #1
0
ファイル: AsyncCommand.cs プロジェクト: petersabry/SimpleWPF
        public AsyncCommand(Func <object, Task> execute, Func <object, bool> canExecute)
        {
            if (execute != null)
            {
                _obvservableTask = new ObservableTask(execute);
                _obvservableTask.Register(this);
            }

            _canExecute = canExecute;
        }
コード例 #2
0
ファイル: AsyncCommand.cs プロジェクト: sandhya2110/SimpleWPF
        public AsyncCommand(Func <object, Task> execute, Func <object, bool> canExecute)
        {
            if (execute == null)
            {
                throw new ArgumentNullException(nameof(execute));
            }

            _observableTask = new ObservableTask(execute);
            _observableTask.Register(this);
            _canExecute = canExecute;
        }