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