Пример #1
0
        public static string GetPageName(string RouteUrl)
        {
            Dictionary <string, Type> dictionary = RP.GetPageTypesDictionaryReprository();

            if (!dictionary.ContainsKey(RouteUrl))
            {
                return(string.Empty);
            }
            Type t = dictionary[RouteUrl];

            return(GetPageName(t));
        }
Пример #2
0
        public static string GetPageIcon(string RouteUrl)
        {
            Dictionary <string, Type> dictionary = RP.GetPageTypesDictionaryReprository();

            if (!dictionary.ContainsKey(RouteUrl))
            {
                return(string.Empty);
            }
            Type t = dictionary[RouteUrl];

            System.Attribute[] attrs = System.Attribute.GetCustomAttributes(t);
            foreach (System.Attribute attr in attrs)
            {
                if (attr is PageIconAttribute)
                {
                    PageIconAttribute a = (PageIconAttribute)attr;
                    return(a.PageIcon);
                }
            }

            return(string.Empty);
        }