Ejemplo n.º 1
0
        public static ReplayParameterObserver <TResult> Observes <TResult>(
            Expression <Func <TResult> > propertyExpression,
            bool isAutoSubscribe = true) where TResult : struct
        {
            var observer = new ReplayParameterObserver <TResult>(propertyExpression);

            if (isAutoSubscribe)
            {
                observer.Subscribe(silent: true);
            }

            return(observer);
        }
Ejemplo n.º 2
0
        public static ReplayParameterObserver <TParameter1, TResult> Observes <TParameter1, TResult>(
            TParameter1 parameter1,
            Expression <Func <TParameter1, TResult> > propertyExpression, TimeSpan window,
            bool isAutoSubscribe = true) where TResult : struct
        {
            var observer = new ReplayParameterObserver <TParameter1, TResult>(parameter1, propertyExpression, window);

            if (isAutoSubscribe)
            {
                observer.Subscribe(silent: true);
            }

            return(observer);
        }