Esempio n. 1
0
 public AuthorizeAttributeCache(ICache cache, IControllerTypeCache controllerTypeCache, IActionMethodCache actionMethodCache)
 {
     this.cache = cache;
     this.controllerTypeCache = controllerTypeCache;
     this.actionMethodCache   = actionMethodCache;
 }
Esempio n. 2
0
        public PanelBarHtmlBuilderFactory(IActionMethodCache actionMethodCache)
        {
            Guard.IsNotNull(actionMethodCache, "actionMethodCache");

            this.actionMethodCache = actionMethodCache;
        }
 public AuthorizeAttributeCache(ICache cache, IControllerTypeCache controllerTypeCache, IActionMethodCache actionMethodCache)
 {
     this.cache = cache;
     this.controllerTypeCache = controllerTypeCache;
     this.actionMethodCache = actionMethodCache;
 }
 public TreeViewHtmlBuilder(TreeView treeView, IActionMethodCache actionMethodCache)
     : base(treeView, actionMethodCache)
 {
 }
        public TabStripHtmlBuilderFactory(IActionMethodCache actionMethodCache)
        {
            Guard.IsNotNull(actionMethodCache, "actionMethodCache");

            this.actionMethodCache = actionMethodCache;
        }
 public PanelBarHtmlBuilder(PanelBar panelBar, IActionMethodCache actionMethodCache)
     : base(panelBar, actionMethodCache)
 {
 }
        public static string GetItemText <TComponent, TItem>(this TComponent component, TItem item, IActionMethodCache actionMethodCache)
            where TComponent : ViewComponentBase, INavigationItemContainer <TItem>
            where TItem : NavigationItem <TItem>, IContentContainer
        {
            string text = item.Text;

            if (string.IsNullOrEmpty(text) && ((!string.IsNullOrEmpty(item.ControllerName) && !string.IsNullOrEmpty(item.ActionName))))
            {
                foreach (MethodInfo method in actionMethodCache.GetActionMethods(component.ViewContext.RequestContext, item.ControllerName, item.ActionName))
                {
                    if (method != null)
                    {
                        string displayName = method.GetDisplayName();

                        if (!string.IsNullOrEmpty(displayName))
                        {
                            text = displayName;
                            break;
                        }
                    }
                }
            }

            return(text);
        }
Esempio n. 8
0
 public NavigationHtmlBuilderBase(TComponent component, IActionMethodCache cache)
 {
     Component         = component;
     ActionMethodCache = cache;
 }
 public TabStripHtmlBuilder(TabStrip tabStrip, IActionMethodCache actionMethodCache)
     : base(tabStrip, actionMethodCache)
 {
 }
Esempio n. 10
0
 public MenuHtmlBuilder(Menu menu, IActionMethodCache actionMethodCache)
     : base(menu, actionMethodCache)
 {
 }
Esempio n. 11
0
 public NavigationHtmlBuilderBaseTestDouble(TComponentTestDouble component, IActionMethodCache cache)
     : base(component, cache)
 {
 }