private Task PublishEventAsync(object entity, ISession session, PostEntityActionType actionType)
        {
            if (entity is IEntity iEntity)
            {
                var @event = new PostEntityActionAsyncEvent(iEntity, session, actionType);
                return(_eventPublisher.PublishAsync(@event));
            }

            return(Task.CompletedTask);
        }
Ejemplo n.º 2
0
 public PostEntityActionAsyncEvent(IEntity entity, ISession session, PostEntityActionType actionType)
 {
     Entity     = entity;
     Session    = session;
     ActionType = actionType;
 }