Example #1
0
 internal CanExecuteObservable(IReactiveNotifyPropertyChanged obj,
                               IEnumerable <Expression <Func <object> > > expressions, Func <bool> func)
 {
     this.func = func;
     AddProperties(expressions);
     obj
     .Changed
     .Where(oc => propertyNames.Any(propertyName => propertyName == oc.PropertyName))
     .Subscribe(oc => Fire());
 }
 public void UnRegisterForChanges(IReactiveNotifyPropertyChanged obj)
 {
     _registeredObjects.Remove(obj);
 }
 public void RegisterForChanges(IReactiveNotifyPropertyChanged obj)
 {
     _registeredObjects.Add(obj);
 }
 public void UnRegisterForChanges(IReactiveNotifyPropertyChanged obj)
 {
     _registeredObjects.Remove(obj);
 }
 public void RegisterForChanges(IReactiveNotifyPropertyChanged obj)
 {
     _registeredObjects.Add(obj);
 }
Example #6
0
 public static CanExecuteObservable WhenAny(this IReactiveNotifyPropertyChanged obj, Expression <Func <object> > property1, Func <bool> func)
 {
     return(obj.WhenAny(new[] { property1 }, func));
 }
Example #7
0
 public static CanExecuteObservable WhenAny(this IReactiveNotifyPropertyChanged obj,
                                            IEnumerable <Expression <Func <object> > > expressions, Func <bool> func)
 {
     return(new CanExecuteObservable(obj, expressions, func));
 }