static string GetGroupName(DefaultUserGroup group) { string fieldName = Enum.GetName(typeof(DefaultUserGroup), group); FieldInfo field = typeof(DefaultUserGroup).GetField(fieldName); UserGroupDefinitionAttribute definition = AttributeUtils.GetAttribute<UserGroupDefinitionAttribute>(field); return definition.Name; }
static string GetGroupName(DefaultUserGroup group) { string fieldName = Enum.GetName(typeof(DefaultUserGroup), group); FieldInfo field = typeof(DefaultUserGroup).GetField(fieldName); UserGroupDefinitionAttribute definition = AttributeUtils.GetAttribute <UserGroupDefinitionAttribute>(field); return(definition.Name); }