Пример #1
0
 /// <summary>
 /// Raises the <see cref="CanExecuteChanged"/> event for any listeners still alive, and removes any references to garbage collected listeners.
 /// </summary>
 public void OnCanExecuteChanged()
 {
     _threadAffinity.VerifyCurrentThread();
     foreach (var canExecuteChanged in _canExecuteChanged.GetLiveItems())
     {
         canExecuteChanged(_sender, EventArgs.Empty);
     }
 }
Пример #2
0
 /// <summary>
 /// Raises the <see cref="CanExecuteChanged"/> event.
 /// </summary>
 public void OnCanExecuteChanged()
 {
     _threadAffinity.VerifyCurrentThread();
     _canExecuteChanged?.Invoke(_sender, EventArgs.Empty);
 }