示例#1
0
 private void RemapMvcAreaName(ref DataModel.MvcData mvcData)
 {
     if (mvcData != null && mvcData.AreaName != null &&
         mvcData.AreaName.Equals("Ish"))
     {
         mvcData.AreaName = DynamicDocumentationModuleAreaRegistration.AREA_NAME;
     }
 }
示例#2
0
        private static Common.Models.MvcData CreateMvcData(DataModel.MvcData data, string defaultControllerName)
        {
            if (data == null)
            {
                return(null);
            }
            if (string.IsNullOrEmpty(data.ViewName))
            {
                throw new DxaException("No View Name specified in MVC Data.");
            }

            return(new Common.Models.MvcData
            {
                ControllerName = data.ControllerName ?? defaultControllerName,
                ControllerAreaName = data.ControllerAreaName ?? SiteConfiguration.GetDefaultModuleName(),
                ActionName = data.ActionName ?? defaultControllerName,
                ViewName = data.ViewName,
                AreaName = data.AreaName ?? SiteConfiguration.GetDefaultModuleName(),
                RouteValues = data.Parameters
            });
        }
示例#3
0
 public void BuildEntityModel(ref EntityModel entityModel, EntityModelData entityModelData, Type baseModelType,
                              Common.Configuration.Localization localization)
 {
     DataModel.MvcData mvcData = entityModelData.MvcData;
     RemapMvcAreaName(ref mvcData);
 }
示例#4
0
 public void BuildPageModel(ref PageModel pageModel, PageModelData pageModelData, bool includePageRegions,
                            Common.Configuration.Localization localization)
 {
     DataModel.MvcData mvcData = pageModelData.MvcData;
     RemapMvcAreaName(ref mvcData);
 }