public T GetFirstEventOfType <T>() where T : IEvent
        {
            IEnumerator <IEvent> enumerator = allEvents.GetBottomToTopEnumerator();

            enumerator.Reset();
            while (enumerator.MoveNext())
            {
                if (enumerator.Current is T)
                {
                    T t = (T)enumerator.Current;
                    enumerator.Dispose();
                    return(t);
                }
            }
            enumerator.Dispose();
            return(default(T));
        }