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); }
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); }
public PageModuleHandlePage <TPageQuery, TPage> ToSelf() { var mapping3 = new PageMapping3(); mapping3.Init <TQuery, TResponse, TResponse>((q, r) => r); module.Mappings3.Add(mapping3); return(on); }
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); }
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); }