Beispiel #1
0
 private void RemapMvcAreaName(ref DataModel.MvcData mvcData)
 {
     if (mvcData != null && mvcData.AreaName != null &&
         mvcData.AreaName.Equals("Ish"))
     {
         mvcData.AreaName = DynamicDocumentationModuleAreaRegistration.AREA_NAME;
     }
 }
Beispiel #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
            });
        }
Beispiel #3
0
 public void BuildEntityModel(ref EntityModel entityModel, EntityModelData entityModelData, Type baseModelType,
                              Common.Configuration.Localization localization)
 {
     DataModel.MvcData mvcData = entityModelData.MvcData;
     RemapMvcAreaName(ref mvcData);
 }
Beispiel #4
0
 public void BuildPageModel(ref PageModel pageModel, PageModelData pageModelData, bool includePageRegions,
                            Common.Configuration.Localization localization)
 {
     DataModel.MvcData mvcData = pageModelData.MvcData;
     RemapMvcAreaName(ref mvcData);
 }