protected static IEnumerable <T> AllRaisedEvents <T>() where T : DomainEvent { return(UncommittedEvents.OfType <T>()); }
protected static TEvent LastRaisedEventOfType <TEvent>() where TEvent : class { return(UncommittedEvents.OfType <TEvent>().LastOrDefault()); }