Ejemplo n.º 1
0
        public static void Setup(IExceptionNotifierConfiguration configuration)
        {
            _configuration = configuration;

            if (_configuration.Email != null)
            {
                _notifiers.Add(new EmailNotifier(_configuration.Email));
            }

            if (_configuration.Hipchat != null)
            {
                _notifiers.Add(new HipchatNotifier(_configuration.Hipchat));
            }

            if (_configuration.Slack != null)
            {
                _notifiers.Add(new SlackNotifier(_configuration.Slack));
            }
        }
Ejemplo n.º 2
0
        public static IApplicationBuilder AddExceptionNotification(this IApplicationBuilder app, IExceptionNotifierConfiguration configuration)
        {
            ExceptionNotifier.Setup(configuration);

            app.UseMiddleware <ExceptionMiddleware>();

            return(app);
        }