示例#1
0
        private static class MyReducers1 { // The reducers to modify the immutable datamodel:
            // The most outer reducer is public to be passed into the store:
            public static MyAppState1 ReduceMyAppState1(MyAppState1 model, object action)
            {
                bool changed = false;

                model.MutateField(model.user, action, (_, user, a) => ReduceUser(user, a), ref changed);
                if (changed)
                {
                    model.MarkMutated();
                }
                return(model);
            }