public Task Notify(IEventNotifierContext context) { if (_handlers.Length == 0) { return(Task.CompletedTask); } return(Task.WhenAll(_handlers.Select(x => x.Notify(context).ContinueWith(t => { if (t.IsFaulted) { _logger.LogError(t.Exception, "failed to notify event, {@context}", context); } else { _logger.LogTrace("success to notify event, {@context}", context); } })))); }
public void OnNewEventHandled(IEventNotifierContext context) { _logger.LogTrace("Received a context {@context} and do nothing", context); // nothing }
public void OnNewEventHandled(IEventNotifierContext context) { _eventHandledNotifierContextSeq.OnNext(context); }
public Task Notify(IEventNotifierContext context) { return(_eventCenter.SendToMinionsAsync(Identity, context.Event)); }