Esempio n. 1
0
 /// <summary>
 /// Creates an instance with its own implementation of <see cref="ICommand.CanExecuteChanged"/>.
 /// </summary>
 protected AsyncCommandBase()
 {
     _canExecuteChanged = new WeakCanExecuteChanged(this);
 }
Esempio 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();
 }
Esempio n. 3
0
 /// <summary>
 /// Creates a new cancel command.
 /// </summary>
 public CancelCommand()
 {
     _cts = new CancellationTokenSource();
     _cts.Cancel();
     _canExecuteChanged = new WeakCanExecuteChanged(this);
 }