public virtual Task SendEvent(IBusinessLogicEvent businessLogicEvent) { Task task = null; if (businessLogicEvent != null) { task = _eventBus.SendEvent(businessLogicEvent); } return(task); }
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); } } }); }
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(); } } })); }
public Task SendEvent(IBusinessLogicEvent @event) { EventsSended.Add(@event); return(Task.Factory.StartNew(() => { })); }
public void SendEvent(IBusinessLogicEvent @event) { EventsSended.Add(@event); }