예제 #1
0
        public PageModule BuildModel <TModel>(Func <TMessage, TResponse, TModel> func)
        {
            var mapping3 = new PageMapping3();

            mapping3.Init <TMessage, TResponse, TModel>(func);
            module.Mappings3.Add(mapping3);
            return(module);
        }
예제 #2
0
        public PageModuleHandlePage <TPageQuery, TPage> ToModel <TModel>(Func <TQuery, TResponse, TModel> func)
        {
            var mapping3 = new PageMapping3();

            mapping3.Init <TQuery, TResponse, TModel>(func);
            module.Mappings3.Add(mapping3);
            return(on);
        }
예제 #3
0
        public PageModuleHandlePage <TPageQuery, TPage> ToSelf()
        {
            var mapping3 = new PageMapping3();

            mapping3.Init <TQuery, TResponse, TResponse>((q, r) => r);
            module.Mappings3.Add(mapping3);
            return(on);
        }
예제 #4
0
        public PageModule BuildModel <TModel>(Action <TMessage, TResponse, TModel> action) where TModel : new()
        {
            var mapping3 = new PageMapping3();

            mapping3.Init <TMessage, TResponse, TModel>((q, r) =>
            {
                var model = new TModel();
                action(q, r, model);
                return(model);
            });
            module.Mappings3.Add(mapping3);
            return(module);
        }
예제 #5
0
        public PageModuleHandlePage <TPageQuery, TPage> ToModel <TModel>(Action <TQuery, TResponse, TModel> action)
            where TModel : new()
        {
            var mapping3 = new PageMapping3();

            mapping3.Init <TQuery, TResponse, TModel>((q, r) =>
            {
                var model = new TModel();
                action(q, r, model);
                return(model);
            });
            module.Mappings3.Add(mapping3);
            return(on);
        }