Table of Contents

Class ApplicationBuilderExtensions

Namespace
Cuemon.Extensions.AspNetCore.Diagnostics
Assembly
Cuemon.Extensions.AspNetCore.dll

Extension methods for the Microsoft.AspNetCore.Builder.IApplicationBuilder interface.

public static class ApplicationBuilderExtensions
Inheritance
Object
ApplicationBuilderExtensions

Methods

UseFaultDescriptorExceptionHandler(IApplicationBuilder)

Adds a middleware to the pipeline that will catch exceptions, log them, and re-execute the request in an alternate pipeline. The request will not be re-executed if the response has already started.

public static IApplicationBuilder UseFaultDescriptorExceptionHandler(this IApplicationBuilder builder)

Parameters

builder IApplicationBuilder

The type that provides the mechanisms to configure an application’s request pipeline.

Returns

IApplicationBuilder

A reference to this instance after the operation has completed.

Remarks

Extends the existing Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware to include features similar to those provided by Cuemon.AspNetCore.Mvc.Filters.Diagnostics.FaultDescriptorFilter, except:

  1. Unable to interact with controller applied attributes (outside scope; part of MVC context)
  2. Unable to mark an exception as handled (outside scope; part of MVC context)

UseServerTiming(IApplicationBuilder, Action<ServerTimingOptions>)

Adds a Server-Timing HTTP header to the Microsoft.AspNetCore.Builder.IApplicationBuilder request execution pipeline.

public static IApplicationBuilder UseServerTiming(this IApplicationBuilder builder, Action<ServerTimingOptions> setup = null)

Parameters

builder IApplicationBuilder

The type that provides the mechanisms to configure an application’s request pipeline.

setup Action<ServerTimingOptions>

The ServerTimingOptions which may be configured.

Returns

IApplicationBuilder

A reference to this instance after the operation has completed.