Beispiel #1
0
        //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;
 }
Beispiel #3
0
 private void AddEvent(LovroEventType eventType)
 {
     AddEvent(new LovroBaseEvent(eventType));
 }