Exemple #1
0
        protected void ApplyToEnity(IInternalEventHandler entity, DomainEvent domainEvent, Boolean onlyIfNotAlreadyHandeld = true)
        {
            if (entity == null || domainEvent == null)
            {
                return;
            }

            if (domainEvent.IsHandled() == false || onlyIfNotAlreadyHandeld == false)
            {
                entity.Handle(domainEvent);
            }
        }
 protected void ApplyToEntity(IInternalEventHandler entity, object @event) => entity?.Handle(@event);
Exemple #3
0
 protected void ApplyToEntity(IInternalEventHandler entity, DomainEvent domainEvent)
 => entity?.Handle(domainEvent);