/// <summary> /// Gets the name of the area. /// </summary> /// <param name="controllerName">Name of the controller.</param> /// <param name="moduleName">Name of dynamic module.</param> /// <returns></returns> private string[] FindAreaNames(string controllerName, string moduleName) { var dynamicTypes = ControllerExtensions.FindDynamicContentTypes(controllerName, moduleName).ToArray(); List <string> areaNames = new List <string>(); // case for dynamic types if (dynamicTypes.Length > 0) { foreach (var dynamicType in dynamicTypes) { var moduleProvider = Telerik.Sitefinity.DynamicModules.Builder.ModuleBuilderManager.GetManager().Provider; var dynamicModule = moduleProvider.GetDynamicModule(dynamicType.ParentModuleId); var areaName = this.GetDynamicTypeAreaName(dynamicModule.Title, dynamicType.DisplayName); if (areaName == null) { continue; } areaNames.Add(areaName); } } else { areaNames.Add(controllerName); } return(areaNames.ToArray()); }