Exemplo n.º 1
0
        public void ForceUpdate()
        {
            this._changed = false;
            TState fixedState;

            lock (this._state)
            {
                // Prevent writing state object
                fixedState = (TState)this._state.Clone();

                // The function may slow
                StateUtil.ResetStateChanged(this._state);
            }

            this.Subject.OnNext(fixedState);
        }
Exemplo n.º 2
0
        public void ForceUpdate()
        {
            this._changed = false;
            TState fixedState;

            lock (this._state)
            {
                // Prevent writing state object
                var action = this._state.LastAction;
                fixedState            = (TState)this._state.Clone();
                fixedState.LastAction = action;
                // The function may slow
                StateUtil.ResetStateChanged(this._state);
            }

            if (this._subject == null)
            {
                this._subject = new Subject <TState>();
            }
            this._subject.OnNext(fixedState);
        }