コード例 #1
0
        public virtual Task SendEvent(IBusinessLogicEvent businessLogicEvent)
        {
            Task task = null;

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

            return(task);
        }
コード例 #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);
             }
         }
     });
 }
コード例 #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();
             }
         }
     }));
 }
コード例 #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);
                    }
                }                
            });

            
        }
コード例 #5
0
 public Task SendEvent(IBusinessLogicEvent @event)
 {
     EventsSended.Add(@event);
     return(Task.Factory.StartNew(() => { }));
 }
コード例 #6
0
 public void SendEvent(IBusinessLogicEvent @event)
 {
     EventsSended.Add(@event);
 }
コード例 #7
0
ファイル: FakeEventBus.cs プロジェクト: NemeStats/NemeStats
 public void SendEvent(IBusinessLogicEvent @event)
 {
     EventsSended.Add(@event);
 }