Exemple #1
0
 protected void RemoveDependencySource(string name, INotifyCollectionChanged source)
 {
     ArgumentValidation.NotNullOrEmpty <char>(name, "name");
     ArgumentValidation.NotNull(source, "source");
     CollectionChangedEventManager.RemoveListener(source, this);
     _collectionSources.Value.Remove(source);
 }
Exemple #2
0
 protected void RemoveDependencySource(string name, INotifyPropertyChanged source)
 {
     ArgumentValidation.NotNullOrEmpty <char>(name, "name");
     ArgumentValidation.NotNull(source, "source");
     PropertyChangedEventManager.RemoveListener(source, this, string.Empty);
     _externalPropertySources.Value.Remove(source);
 }
Exemple #3
0
 public T CheckAccessInvoke <T>(Func <T> func)
 {
     ArgumentValidation.NotNull(func, "action");
     if (CheckAccess())
     {
         return(func());
     }
     return(Dispatcher.Invoke(func, DispatcherPriority.Normal));
 }
Exemple #4
0
 public void CheckAccessInvoke(Action action)
 {
     ArgumentValidation.NotNull(action, "action");
     if (CheckAccess())
     {
         action();
         return;
     }
     Dispatcher.Invoke(action, DispatcherPriority.Normal);
 }
Exemple #5
0
 public async Task <T> CheckAccessInvokeAsync <T>(Func <T> func)
 {
     ArgumentValidation.NotNull(func, "action");
     if (CheckAccess())
     {
         return(func());
     }
     else
     {
         return(await Dispatcher.InvokeAsync(func, DispatcherPriority.Normal));
     }
 }
Exemple #6
0
 public async Task CheckAccessInvokeAsync(Action action)
 {
     ArgumentValidation.NotNull(action, "action");
     if (CheckAccess())
     {
         action();
     }
     else
     {
         await Dispatcher.InvokeAsync(action, DispatcherPriority.Normal);
     }
 }