public static T GetEvent <T>(this AggregateDomainEventMessage item)
     where T : class, IDomainEvent
 {
     if (item.IsEventType <T>())
     {
         return(JsonConvert.DeserializeObject <T>(item.DomainEventContent));
     }
     return(default(T));
 }
 public static bool IsAggregate <T>(this AggregateDomainEventMessage item)
     where T : IAggregateRoot
 {
     return(typeof(T).GetTypeShortName().Equals(item.AggregateType));
 }