Ejemplo n.º 1
0
 /// <summary>
 /// Creates an instance with its own implementation of <see cref="ICommand.CanExecuteChanged"/>.
 /// </summary>
 protected AsyncCommandBase()
 {
     _canExecuteChanged = new WeakCanExecuteChanged(this);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a new explicit implementation of <c>ICommand.CanExecuteChanged</c>.
 /// </summary>
 /// <param name="sender">The sender of the <c>ICommand.CanExecuteChanged</c> event.</param>
 public ExplicitCanExecute(object sender)
 {
     _canExecuteChanged = new WeakCanExecuteChanged(sender);
     _threadAffinity    = ThreadAffinity.BindToCurrentThread();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates a new cancel command.
 /// </summary>
 public CancelCommand()
 {
     _cts = new CancellationTokenSource();
     _cts.Cancel();
     _canExecuteChanged = new WeakCanExecuteChanged(this);
 }