Пример #1
0
        public static string FriendlyClassName(Type t)
        {
            string name = t.Name;

            if (typeof(I_Generated).IsAssignableFrom(t))
            {
                t = ApiHelper.ConcreteType(t);
            }
            //var att = t.GetCustomAttribute<FriendlyClassNameAttribute>();
            var att = t.GetCustomAttribute <DisplayAttribute>(false);

            if (att != null)
            {
                name = att.Name;
            }
            return(name);
        }