public static void AfterOnExceptionAsync(
            this DiagnosticListener diagnosticListener,
            ExceptionContext exceptionContext,
            IAsyncExceptionFilter filter)
        {
            Debug.Assert(diagnosticListener != null);
            Debug.Assert(exceptionContext != null);
            Debug.Assert(filter != null);

            // Inlinable fast-path check if diagnostic listener is enabled
            if (diagnosticListener.IsEnabled())
            {
                AfterOnExceptionAsyncImpl(diagnosticListener, exceptionContext, filter);
            }
        }
Beispiel #2
0
 public static void AfterOnExceptionAsync(
     this DiagnosticSource diagnosticSource,
     ExceptionContext exceptionContext,
     IAsyncExceptionFilter filter)
 {
     if (diagnosticSource.IsEnabled("Microsoft.AspNetCore.Mvc.AfterOnException"))
     {
         diagnosticSource.Write(
             "Microsoft.AspNetCore.Mvc.AfterOnException",
             new
         {
             actionDescriptor = exceptionContext.ActionDescriptor,
             exceptionContext = exceptionContext,
             filter           = filter
         });
     }
 }
Beispiel #3
0
        public static void BeforeOnExceptionAsync(
            this DiagnosticSource diagnosticSource,
            ExceptionContext exceptionContext,
            IAsyncExceptionFilter filter)
        {
            Debug.Assert(diagnosticSource != null);
            Debug.Assert(exceptionContext != null);
            Debug.Assert(filter != null);

            if (diagnosticSource.IsEnabled("Microsoft.AspNetCore.Mvc.BeforeOnException"))
            {
                diagnosticSource.Write(
                    "Microsoft.AspNetCore.Mvc.BeforeOnException",
                    new
                {
                    actionDescriptor = exceptionContext.ActionDescriptor,
                    exceptionContext = exceptionContext,
                    filter           = filter
                });
            }
        }
 private static void AfterOnExceptionAsyncImpl(DiagnosticListener diagnosticListener, ExceptionContext exceptionContext, IAsyncExceptionFilter filter)
 {
     if (diagnosticListener.IsEnabled(Diagnostics.AfterExceptionFilterOnExceptionEventData.EventName))
     {
         diagnosticListener.Write(
             Diagnostics.AfterExceptionFilterOnExceptionEventData.EventName,
             new AfterExceptionFilterOnExceptionEventData(
                 exceptionContext.ActionDescriptor,
                 exceptionContext,
                 filter
                 ));
     }
 }
 public static void AfterOnExceptionAsync(
     this DiagnosticSource diagnosticSource,
     ExceptionContext exceptionContext,
     IAsyncExceptionFilter filter)
 {
     if (diagnosticSource.IsEnabled("Microsoft.AspNetCore.Mvc.AfterOnException"))
     {
         diagnosticSource.Write(
             "Microsoft.AspNetCore.Mvc.AfterOnException",
             new
             {
                 actionDescriptor = exceptionContext.ActionDescriptor,
                 exceptionContext = exceptionContext,
                 filter = filter
             });
     }
 }
        public static void BeforeOnExceptionAsync(
            this DiagnosticSource diagnosticSource,
            ExceptionContext exceptionContext,
            IAsyncExceptionFilter filter)
        {
            Debug.Assert(diagnosticSource != null);
            Debug.Assert(exceptionContext != null);
            Debug.Assert(filter != null);

            if (diagnosticSource.IsEnabled("Microsoft.AspNetCore.Mvc.BeforeOnException"))
            {
                diagnosticSource.Write(
                    "Microsoft.AspNetCore.Mvc.BeforeOnException",
                    new
                    {
                        actionDescriptor = exceptionContext.ActionDescriptor,
                        exceptionContext = exceptionContext,
                        filter = filter
                    });
            }
        }
 private static void AfterOnExceptionAsyncImpl(DiagnosticListener diagnosticListener, ExceptionContext exceptionContext, IAsyncExceptionFilter filter)
 {
     if (diagnosticListener.IsEnabled("Microsoft.AspNetCore.Mvc.AfterOnException"))
     {
         diagnosticListener.Write(
             "Microsoft.AspNetCore.Mvc.AfterOnException",
             new
         {
             actionDescriptor = exceptionContext.ActionDescriptor,
             exceptionContext = exceptionContext,
             filter           = filter
         });
     }
 }
 private static void BeforeOnExceptionAsyncImpl(DiagnosticListener diagnosticListener, ExceptionContext exceptionContext, IAsyncExceptionFilter filter)
 {
     if (diagnosticListener.IsEnabled(Diagnostics.BeforeOnException.EventName))
     {
         diagnosticListener.Write(
             Diagnostics.BeforeOnException.EventName,
             new BeforeOnException(
                 exceptionContext.ActionDescriptor,
                 exceptionContext,
                 filter
                 ));
     }
 }