예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExceptionlessCoreMiddleware"/> class.
 /// </summary>
 /// <param name="next">The next.</param>
 /// <param name="diagnosticSource">The diagnostic source.</param>
 /// <param name="exceptionlessCorePlugIn">The exception Core manager.</param>
 public ExceptionlessCoreMiddleware(
     RequestDelegate next,
     ExceptionlessCoreOptions exceptionlessCoreOptions,
     DiagnosticSource diagnosticSource,
     ExceptionlessCorePlugIn exceptionlessCorePlugIn)
 {
     _next = next;
     _exceptionlessCoreOptions = exceptionlessCoreOptions;
     _diagnosticSource         = diagnosticSource;
     _exceptionlessCorePlugIn  = exceptionlessCorePlugIn;
 }
예제 #2
0
        /// <summary>
        /// Uses the AspNetCore App Builder.
        /// </summary>
        /// <param name="builder">The builder.</param>
        /// <returns></returns>
        public static IApplicationBuilder UseExceptionCorePlugIn(this IApplicationBuilder builder, ExceptionlessCoreOptions options = null)
        {
            var middlewareOptions = options ?? new ExceptionlessCoreOptions()
            {
                RethrowException = false
            };

            return(builder.UseMiddleware <ExceptionlessCoreMiddleware>(middlewareOptions));
        }