Exemple #1
0
        /// <summary>
        /// Adds Exception specific configuration.
        /// </summary>
        /// <typeparam name="TException">The type of the exception.</typeparam>
        /// <param name="configure">Configuration callback.</param>
        public void ConfigureException <TException>(Action <ExceptionHandlerExceptionOptions> configure)
            where TException : Exception
        {
            var options = new ExceptionHandlerExceptionOptions();

            configure(options);
            ConfigurationPerExceptionTypeSource.Add(typeof(TException), options);
        }
Exemple #2
0
 /// <summary>
 /// Removes Exception specific configuration.
 /// </summary>
 /// <typeparam name="TException">The type of the exception.</typeparam>
 public void UnconfigureException <TException>() where TException : Exception
 {
     ConfigurationPerExceptionTypeSource.Remove(typeof(TException));
 }