Exemplo n.º 1
0
        public virtual Task SendEvent(IBusinessLogicEvent businessLogicEvent)
        {
            Task task = null;

            if (businessLogicEvent != null)
            {
                task = _eventBus.SendEvent(businessLogicEvent);
            }

            return(task);
        }
Exemplo n.º 2
0
 public virtual void SendEvent(IBusinessLogicEvent @event)
 {
     Task.Factory.StartNew(() =>
     {
         var eventHandlers = this._handlerFactory.GetHandlers(@event.GetType());
         foreach (var handlerInstance in eventHandlers)
         {
             try
             {
                 handlerInstance.Handle(@event);
             }
             catch (System.Exception ex)
             {
                 _rollbar.SendException(ex);
             }
         }
     });
 }
Exemplo n.º 3
0
 public virtual Task SendEvent(IBusinessLogicEvent @event)
 {
     return(Task.Factory.StartNew(() =>
     {
         var eventHandlers = this._handlerFactory.GetHandlers(@event.GetType());
         foreach (var handlerInstance in eventHandlers)
         {
             try
             {
                 handlerInstance.Handle(@event);
             }
             catch (Exception ex)
             {
                 _rollbar.SendException(ex);
                 ex.ToExceptionless();
             }
         }
     }));
 }
Exemplo n.º 4
0
        public virtual void SendEvent(IBusinessLogicEvent @event)
        {

            Task.Factory.StartNew(() =>
            {
                var eventHandlers = this._handlerFactory.GetHandlers(@event.GetType());
                foreach (var handlerInstance in eventHandlers)
                {
                    try
                    {
                        handlerInstance.Handle(@event);
                    }
                    catch (System.Exception ex)
                    {
                        _rollbar.SendException(ex);
                    }
                }                
            });

            
        }
Exemplo n.º 5
0
 public Task SendEvent(IBusinessLogicEvent @event)
 {
     EventsSended.Add(@event);
     return(Task.Factory.StartNew(() => { }));
 }
Exemplo n.º 6
0
 public void SendEvent(IBusinessLogicEvent @event)
 {
     EventsSended.Add(@event);
 }
Exemplo n.º 7
0
 public void SendEvent(IBusinessLogicEvent @event)
 {
     EventsSended.Add(@event);
 }