BusinessLogic.Events.HandlerFactory.BusinessLogicEventBus.SendEvent C# (CSharp) Method

SendEvent() public method

public SendEvent ( IBusinessLogicEvent @event ) : void
@event IBusinessLogicEvent
return void
        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);
                    }
                }                
            });

            
        }
    }