示例#1
0
        public static MvcHtmlString RenderDashboardArea(this HtmlHelper htmlHelper, DashboardArea dashboardArea)
        {
            var actionMethodsWithAttribute =
                MrCMSControllerFactory.GetActionMethodsWithAttribute<DashboardAreaAction>()
                    .Where(info => info.Attribute.DashboardArea == dashboardArea);

            return actionMethodsWithAttribute.OrderBy(info => info.Attribute.Order)
                .Aggregate(MvcHtmlString.Empty,
                    (current, actionMethodInfo) =>
                        current.Concat(htmlHelper.Action(actionMethodInfo.Descriptor.ActionName,
                            actionMethodInfo.Descriptor.ControllerDescriptor.ControllerName)));
        }
示例#2
0
        public static MvcHtmlString RenderDashboardArea(this HtmlHelper htmlHelper, DashboardArea dashboardArea)
        {
            var actionMethodsWithAttribute =
                MrCMSControllerFactory.GetActionMethodsWithAttribute <DashboardAreaAction>()
                .Where(info => info.Attribute.DashboardArea == dashboardArea);

            return(actionMethodsWithAttribute.OrderBy(info => info.Attribute.Order)
                   .Aggregate(MvcHtmlString.Empty,
                              (current, actionMethodInfo) =>
                              current.Concat(htmlHelper.Action(actionMethodInfo.Descriptor.ActionName,
                                                               actionMethodInfo.Descriptor.ControllerDescriptor.ControllerName))));
        }