public static Type GetGeneratorClass(this Enum value) { FieldInfo field; if (GetFieldInfo(value, out field)) { return(null); } GridTypeAttribute attr = Attribute.GetCustomAttribute(field, typeof(GridTypeAttribute)) as GridTypeAttribute; return(attr?.GeneratorClass); }
public static string GetTitle(this Enum value) { FieldInfo field; if (GetFieldInfo(value, out field)) { return(null); } GridTypeAttribute attr = Attribute.GetCustomAttribute(field, typeof(GridTypeAttribute)) as GridTypeAttribute; return(attr?.Title); }