public ActionResult Result <T>(T ViewModel) where T : IPageViewModel { IViewBuilder handler = default(IViewBuilder); if (!ApplicationStartContextSecurityMVCExtensions.pageViews.TryGetValue(typeof(T), out handler)) { return(Content("没有找到跟视图模型对应的视图")); } ViewBuilder <T> builder = handler as ViewBuilder <T>; SharpDomView <T> page = builder.PageBuilder(ViewModel); if (page is PageView <T> ) { PageView <T> pv = page as PageView <T>; pv.MasterBuilder = builder.MasterBuilder; } else { this.ClearBzureFlag(); } return(View(page, ViewModel)); }