public override void OnBufferEmit(IList <TContext> context, TimeSpan alertPeriod) { if (context == null || context.Count == 0) { return; } var message = BuildMessage(context, alertPeriod); _alertStrategy.Alert(message); }
public override void Sampled(TContext context, int eventCount, TimeSpan alertPeriod) { var message = BuildMessage(context, eventCount, alertPeriod); _alertStrategy.Alert(message); }
public async Task AlertWork(DiscordClient client) { await _strategy.Alert(client, _alertService); }