private void SourceOnPropertyChanged(object sender, PropertyChangedEventArgs propertyChangedEventArgs)
 {
     _threadAffinity.VerifyCurrentThread();
     if (propertyChangedEventArgs.PropertyName == _propertyName || _propertyName == null)
     {
         _handler(sender, propertyChangedEventArgs);
     }
 }
示例#2
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);
     }
 }
 /// <summary>
 /// Raises the <see cref="CanExecuteChanged"/> event.
 /// </summary>
 public void OnCanExecuteChanged()
 {
     _threadAffinity.VerifyCurrentThread();
     _canExecuteChanged?.Invoke(_sender, EventArgs.Empty);
 }
示例#4
0
 bool ICanExecute.CanExecute(object parameter)
 {
     _threadAffinity.VerifyCurrentThread();
     return(CanExecute);
 }