public static IPropertyReferenceObserverWithGetter <TResult> ObservesAndGet <TResult>( [NotNull] Expression <Func <TResult> > propertyExpression, bool isAutoActivate, [NotNull] Action action) where TResult : class { var observer = new PropertyReferenceObserverWithGetter <TResult>(propertyExpression, action, PropertyObserverFlag.None); if (isAutoActivate) { observer.Activate(true); } return(observer); }
ObservesAndGet <TParameter1, TParameter2, TResult>( [NotNull] TParameter1 parameter1, [NotNull] TParameter2 parameter2, [NotNull] Expression <Func <TParameter1, TParameter2, TResult> > propertyExpression, bool isAutoActivate, [NotNull] Action action) where TResult : class where TParameter1 : INotifyPropertyChanged where TParameter2 : INotifyPropertyChanged { var observer = new PropertyReferenceObserverWithGetter <TParameter1, TParameter2, TResult>( parameter1, parameter2, propertyExpression, action, PropertyObserverFlag.None); if (isAutoActivate) { observer.Activate(true); } return(observer); }