Exemplo n.º 1
0
        TState IReducer <TState> .Reduce(TState currentState, IAction actionContext)
        {
            TSectionType current = m_getValue(currentState);

            TSectionType after = m_sectionReducer.Reduce(current, actionContext);

            if (!ReferenceEquals(current, after))
            {
                TState copyState = (TState)ReflectionUtility.CopyInstance(typeof(TState), currentState);
                m_setValue(copyState, after);
                return(copyState);
            }

            return(currentState);
        }