예제 #1
0
        public static bool?GetCanHover(this Enum value)
        {
            FieldInfo field;

            if (GetFieldInfo(value, out field))
            {
                return(null);
            }

            PlotTypeAttribute attr = Attribute.GetCustomAttribute(field, typeof(PlotTypeAttribute)) as PlotTypeAttribute;

            return(attr?.CanHover);
        }
예제 #2
0
        public static string GetTitle(this Enum value)
        {
            FieldInfo field;

            if (GetFieldInfo(value, out field))
            {
                return(null);
            }

            PlotTypeAttribute attr = Attribute.GetCustomAttribute(field, typeof(PlotTypeAttribute)) as PlotTypeAttribute;

            return(attr?.Title);
        }
예제 #3
0
        public static Type GetGeneratorClass(this Enum value)
        {
            FieldInfo field;

            if (GetFieldInfo(value, out field))
            {
                return(null);
            }

            PlotTypeAttribute attr = Attribute.GetCustomAttribute(field, typeof(PlotTypeAttribute)) as PlotTypeAttribute;

            return(attr?.GeneratorClass);
        }