Esempio n. 1
0
 public void OnPropertyChanged(PremiseServer thisServer, PropertyChangedEventHandler handler, [CallerMemberName] string propertyName = null) {
     if (handler != null) {
         if (Deployment.Current.Dispatcher.CheckAccess())
             handler(thisServer, new PropertyChangedEventArgs(propertyName));
         else
             Deployment.Current.Dispatcher.BeginInvoke(() => handler(thisServer, new PropertyChangedEventArgs(propertyName)));
     }
 }
Esempio n. 2
0
 public void OnPropertyChanged(PremiseServer thisServer, PropertyChangedEventHandler handler, [CallerMemberName] string propertyName = null) {
     if (handler != null) {
         if (CoreApplication.MainView.CoreWindow.Dispatcher.HasThreadAccess)
             handler(thisServer, new PropertyChangedEventArgs(propertyName));
         else
             CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(
                 CoreDispatcherPriority.Normal, () => handler(thisServer, new PropertyChangedEventArgs(propertyName)));
     }
 }
Esempio n. 3
0
 // Default OnPropertyChanged method assumes same thread.
 public void OnPropertyChanged(PremiseServer thisServer, PropertyChangedEventHandler handler, [CallerMemberName] string propertyName = null) {
     if (handler != null) {
         handler(thisServer, new PropertyChangedEventArgs(propertyName));
     }
 }