private string GetStatusDescription(LovroDiaperStatus status) { FieldInfo fi = status.GetType().GetField(status.ToString()); DescriptionAttribute[] attributes = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false); return attributes.FirstOrDefault() != null ? attributes.FirstOrDefault().Description : "UNKNOWN"; }
public LovroDiaperChangedEvent(LovroDiaperStatus status, string note = "") : base(LovroEventType.DiaperChanged, note) { Status = status; }
private void AddDiaperChangedEvent(LovroDiaperStatus diaperStatus) { AddEvent(new LovroDiaperChangedEvent(diaperStatus)); }