public static IPropertyReferenceObserverOnValueChanged <TResult> ObservesOnValueChanged <TResult>(
            [NotNull] Expression <Func <TResult> > propertyExpression,
            bool isAutoActivate)
            where TResult : class
        {
            var observer = new PropertyReferenceObserverOnValueChanged <TResult>(propertyExpression, PropertyObserverFlag.None);

            if (isAutoActivate)
            {
                observer.Activate(true);
            }

            return(observer);
        }
Ejemplo n.º 2
0
        ObservesOnValueChanged <TParameter1, TResult>(
            [NotNull] this TParameter1 parameter1,
            [NotNull] Expression <Func <TParameter1, TResult> > propertyExpression,
            bool isAutoActivate)
            where TParameter1 : INotifyPropertyChanged
            where TResult : class
        {
            var observer =
                new PropertyReferenceObserverOnValueChanged <TParameter1, TResult>(parameter1, propertyExpression, PropertyObserverFlag.None);

            if (isAutoActivate)
            {
                observer.Activate(true);
            }

            return(observer);
        }