Esempio n. 1
0
        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);
        }
Esempio n. 3
0
 public async Task AlertWork(DiscordClient client)
 {
     await _strategy.Alert(client, _alertService);
 }