public static string GetName(this StatusTag value) { var fi = typeof(StatusTag).GetField(value.ToString()); var attributes = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false); return(attributes.Length > 0 ? attributes[0].Description : value.ToString()); }
public StatusIconDefinition this[StatusTag status] => Icons[status.ToString()];