//TODO REFACTOR private string GetEventTypeDescription(LovroEventType type) { FieldInfo fi = type.GetType().GetField(type.ToString()); DescriptionAttribute[] attributes = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false); return attributes.FirstOrDefault() != null ? attributes.FirstOrDefault().Description : "UNKNOWN"; }
public LovroBaseEvent(LovroEventType type, string note = "") : this() { Type = type; Note = note; }
private void AddEvent(LovroEventType eventType) { AddEvent(new LovroBaseEvent(eventType)); }