private static IExtViewService getExtDataService(String typeFullName) { String serviceType = getServiceTypeName(typeFullName); IExtViewService extData = ObjectContext.GetByType(serviceType) as IExtViewService; return(extData); }
// 参数 ctx 提供当前登录用户信息和link public static String GetExtView(int id, String typeFullName, String extTypeFullName, MvcContext ctx) { IExtViewService viewService = getExtDataService(extTypeFullName); if (viewService == null) { throw new NotImplementedException("not implemented view service:" + getServiceTypeName(extTypeFullName)); } logger.Info("view service name: " + viewService.GetType().FullName); return(viewService.GetViewById(id, typeFullName, ctx)); }