Example #1
0
        public static BindingObserver Subscribe(Bndng binding, Action onChanged)
        {
            BindingObserver observer1 = new BindingObserver(binding);

            observer1.Changed += delegate(object <p0>, EventArgs <p1>) {
                onChanged.Invoke();
            };
            return(observer1);
        }
Example #2
0
        public static BindingObserver Subscribe <T>(Bndng binding, Action <T> onNext)
        {
            BindingObserver observer = new BindingObserver(binding);

            observer.Changed += delegate(object <p0>, EventArgs <p1>) {
                onNext((T)observer.Value);
            };
            return(observer);
        }
Example #3
0
        private static void OnChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            BindingObserver observer = sender as BindingObserver;

            if ((observer != null) && !observer._disposed)
            {
                observer.Changed(observer, EventArgs.Empty);
            }
        }