Ejemplo n.º 1
0
 /// <summary>
 /// Creates an instance with its own implementation of <see cref="ICommand.CanExecuteChanged"/>.
 /// </summary>
 protected AsyncCommandBase(Func <object, ICanExecuteChanged> canExecuteChangedFactory)
 {
     _canExecuteChanged = canExecuteChangedFactory(this);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a new cancel command.
 /// </summary>
 /// <param name="canExecuteChangedFactory">The factory for the implementation of <see cref="ICommand.CanExecuteChanged"/>.</param>
 public CancelCommand(Func <object, ICanExecuteChanged> canExecuteChangedFactory)
 {
     _canExecuteChanged = canExecuteChangedFactory(this);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates an instance with its own implementation of <see cref="ICommand.CanExecuteChanged"/>.
 /// </summary>
 protected AsyncCommandBase(Func <object, ICanExecuteChanged> canExecuteChangedFactory)
 {
     _ = canExecuteChangedFactory ?? throw new ArgumentNullException(nameof(canExecuteChangedFactory));
     _canExecuteChanged = canExecuteChangedFactory(this);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Creates a new cancel command.
 /// </summary>
 /// <param name="canExecuteChangedFactory">The factory for the implementation of <see cref="ICommand.CanExecuteChanged"/>.</param>
 public CancelCommand(Func <object, ICanExecuteChanged> canExecuteChangedFactory)
 {
     _ = canExecuteChangedFactory ?? throw new ArgumentNullException(nameof(canExecuteChangedFactory));
     _canExecuteChanged = canExecuteChangedFactory(this);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Creates a new cancel command.
 /// </summary>
 /// <param name="canExecuteChangedFactory">The factory for the implementation of <see cref="ICommand.CanExecuteChanged"/>.</param>
 public CancelCommand(Func <object, ICanExecuteChanged> canExecuteChangedFactory)
 {
     _cts = new CancellationTokenSource();
     _cts.Cancel();
     _canExecuteChanged = canExecuteChangedFactory(this);
 }