public static string GetIcon(this ReminderStateType enumerationValue) { var type = enumerationValue.GetType(); if (!type.IsEnum) { throw new ArgumentException($"{nameof(enumerationValue)} must be of Enum type", nameof(enumerationValue)); } var value = ""; switch (enumerationValue) { case ReminderStateType.NonExpired: value = "nc-align-center"; break; case ReminderStateType.Expiring: value = "nc-notification-70"; break; case ReminderStateType.Expired: value = "nc-time-alarm"; break; } return(value); }
public static string GetColor(this ReminderStateType enumerationValue) { var type = enumerationValue.GetType(); if (!type.IsEnum) { throw new ArgumentException($"{nameof(enumerationValue)} must be of Enum type", nameof(enumerationValue)); } var value = ""; switch (enumerationValue) { case ReminderStateType.NonExpired: value = "#4caf50"; break; case ReminderStateType.Expiring: value = "#ffc107"; break; case ReminderStateType.Expired: value = "#dd1e31"; break; } return(value); }