public void Event(string name, string content, EventType eventType) { // log event var eventItem = new EventItem { Name = name, Content = content, EventType = eventType, TimeCreated = DateTime.Now }; _events.Push(eventItem); // queue overflow if (_events.Count > EVENT_LOG_SIZE) { // remove last item _events.Pop(); } // raise event _RaiseOnEventOccured(eventItem); }
private void _RaiseOnEventOccured(EventItem item) => EventOccured?.Invoke(this, new EventOccuredEventArgs(item));
public EventOccuredEventArgs(EventItem item) { Event = item; }