/// <summary>
 /// Return true if the operation should be vetoed
 /// </summary>
 /// <param name="event"/>
 public bool OnPreDelete(PreDeleteEvent @event)
 {
     try
     {
         AggregateDataInterceptor.OnDeleteCheckAggregate(@event.Entity, @event.Session);
         return(false);
     }
     catch (Exception ex)
     {
         throw new InvalidOperationException("Error trying to flush aggregates during pre-delete phase: {0}".InvariantFormat(GetUsefulEntityName(@event.Entity, null, null)), ex);
     }
 }
 public void OnDelete(DeleteEvent @event, ISet transientEntities)
 {
     try
     {
         try
         {
             AggregateDataInterceptor.OnDeleteCheckAggregate(@event.Entity, @event.Session);
         }
         finally
         {
             _defaultDeleteListener.OnDelete(@event, transientEntities);
         }
     }
     catch (Exception ex)
     {
         throw new ApplicationException(string.Format("Error while trying to delete a {0} with id {1}", @event.EntityName, @event.Session.GetIdentifier(@event.Entity)), ex);
     }
 }