private async Task Beat() { var heartbeatEvent = CreateHeartbeatEvent(); await _eventSender.Publish(heartbeatEvent); }
public Task Publish <TBusEvent>(TBusEvent busEvent) where TBusEvent : IBusEvent { return(Task.Run(() => _eventSender.Publish(busEvent)).ConfigureAwaitFalse()); }
public Task Publish <TBusEvent>(TBusEvent busEvent) where TBusEvent : IBusEvent { return(_taskFactory.StartNew(() => _eventSender.Publish(busEvent), TaskContext.Send).Unwrap()); }