Esempio n. 1
0
        public static SearchState Reduce(SearchState state, IAction action)
        {
            switch (action)
            {
            case SetSearchTextAction act:
                return(state.UpdateSearch(act.SearchText));

            case SetSearchResultsAction res:
                return(state.UpdateSearchResults(res.Results));
            }

            return(state);
        }