Table of Contents

Class ApplicationBuilderExtensions

Namespace
Cuemon.Extensions.AspNetCore.Http.Headers
Assembly
Cuemon.Extensions.AspNetCore.dll

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

public static class ApplicationBuilderExtensions
Inheritance
Object
ApplicationBuilderExtensions

Methods

UseApiKeySentinel(IApplicationBuilder, Action<ApiKeySentinelOptions>)

Adds an API key header parser to the Microsoft.AspNetCore.Builder.IApplicationBuilder request execution pipeline.

public static IApplicationBuilder UseApiKeySentinel(this IApplicationBuilder builder, Action<ApiKeySentinelOptions> setup = null)

Parameters

builder IApplicationBuilder

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

setup Action<ApiKeySentinelOptions>

The ApiKeySentinelOptions middleware which may be configured.

Returns

IApplicationBuilder

An Microsoft.AspNetCore.Builder.IApplicationBuilder that can be used to further configure the request pipeline.

UseCacheControl(IApplicationBuilder, Action<CacheableOptions>)

Adds an HTTP Cache-Control and HTTP Expires header to the Microsoft.AspNetCore.Builder.IApplicationBuilder request execution pipeline.

public static IApplicationBuilder UseCacheControl(this IApplicationBuilder builder, Action<CacheableOptions> setup = null)

Parameters

builder IApplicationBuilder

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

setup Action<CacheableOptions>

The CacheableOptions middleware which may be configured.

Returns

IApplicationBuilder

An Microsoft.AspNetCore.Builder.IApplicationBuilder that can be used to further configure the request pipeline.

UseCorrelationIdentifier(IApplicationBuilder, Action<CorrelationIdentifierOptions>)

Adds a correlation identifier HTTP header to the Microsoft.AspNetCore.Builder.IApplicationBuilder request execution pipeline.

public static IApplicationBuilder UseCorrelationIdentifier(this IApplicationBuilder builder, Action<CorrelationIdentifierOptions> setup = null)

Parameters

builder IApplicationBuilder

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

setup Action<CorrelationIdentifierOptions>

The CorrelationIdentifierOptions middleware which may be configured.

Returns

IApplicationBuilder

An Microsoft.AspNetCore.Builder.IApplicationBuilder that can be used to further configure the request pipeline.

Remarks

Default HTTP header name is X-Correlation-ID.

UseRequestIdentifier(IApplicationBuilder, Action<RequestIdentifierOptions>)

Adds a request identifier HTTP header to the Microsoft.AspNetCore.Builder.IApplicationBuilder request execution pipeline.

public static IApplicationBuilder UseRequestIdentifier(this IApplicationBuilder builder, Action<RequestIdentifierOptions> setup = null)

Parameters

builder IApplicationBuilder

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

setup Action<RequestIdentifierOptions>

The RequestIdentifierOptions middleware which may be configured.

Returns

IApplicationBuilder

An Microsoft.AspNetCore.Builder.IApplicationBuilder that can be used to further configure the request pipeline.

Remarks

Default HTTP header name is X-Request-ID.

UseUserAgentSentinel(IApplicationBuilder, Action<UserAgentSentinelOptions>)

Adds a HTTP User-Agent header parser to the Microsoft.AspNetCore.Builder.IApplicationBuilder request execution pipeline.

public static IApplicationBuilder UseUserAgentSentinel(this IApplicationBuilder builder, Action<UserAgentSentinelOptions> setup = null)

Parameters

builder IApplicationBuilder

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

setup Action<UserAgentSentinelOptions>

The UserAgentSentinelOptions middleware which may be configured.

Returns

IApplicationBuilder

An Microsoft.AspNetCore.Builder.IApplicationBuilder that can be used to further configure the request pipeline.