public virtual bool Equals(EntityBase other)
        {
            if (null != other && other.GetType() == GetType())
            {
                return other.Identity.Equals(Identity);
            }

            return false;
        }
 public EventHandlerNotFoundException(EntityBase entity, DomainEvent @event)
     : base(GetErrorMessage(entity, @event))
 {
 }
 private static string GetErrorMessage(EntityBase entity, DomainEvent @event)
 {
     return String.Format("Unable to locate an event handler for {0} on {1}", @event.GetType().FullName, entity.GetType().FullName);
 }
 private static string GetErrorMessage(EntityBase entity, DomainEvent @event)
 {
     return(String.Format("An error occured while invoking event handler {0} on {1}", @event.GetType().FullName, entity.GetType().FullName));
 }
 public EventHandlerInvocationException(EntityBase entity, DomainEvent @event, TargetInvocationException ex)
     : base(GetErrorMessage(entity, @event), ex.InnerException ?? ex)
 {
 }
 private static string GetErrorMessage(EntityBase entity, DomainEvent @event)
 {
     return String.Format("An error occured while invoking event handler {0} on {1}", @event.GetType().FullName, entity.GetType().FullName);
 }
Beispiel #7
0
 public EventHandlerNotFoundException(EntityBase entity, DomainEvent @event)
     : base(GetErrorMessage(entity, @event))
 {
 }
Beispiel #8
0
 private static string GetErrorMessage(EntityBase entity, DomainEvent @event)
 {
     return(String.Format("Unable to locate an event handler for {0} on {1}", @event.GetType().FullName, entity.GetType().FullName));
 }