Table of Contents

Class HttpContextDecoratorExtensions

Namespace
Cuemon.AspNetCore.Http
Assembly
Cuemon.AspNetCore.dll

Extension methods for the Microsoft.AspNetCore.Http.HttpContext class hidden behind the IDecorator<T> interface. This API supports the product infrastructure and is not intended to be used directly from your code.

public static class HttpContextDecoratorExtensions
Inheritance
HttpContextDecoratorExtensions

Methods

InvokeApiKeySentinelAsync(IDecorator<HttpContext>, ApiKeySentinelOptions)

Common API key logic for ASP.NET Core and ASP.NET Core MVC. Not intended to be used directly from your code.

public static async Task InvokeApiKeySentinelAsync(this IDecorator<HttpContext> decorator, ApiKeySentinelOptions options)

Parameters

decorator IDecorator<HttpContext>

The IDecorator<T> to extend.

options ApiKeySentinelOptions

The configured options.

Returns

Task

InvokeThrottlerSentinelAsync(IDecorator<HttpContext>, IThrottlingCache, ThrottlingSentinelOptions)

Common throttler operation logic for ASP.NET Core and ASP.NET Core MVC. Not intended to be used directly from your code.

public static async Task InvokeThrottlerSentinelAsync(this IDecorator<HttpContext> decorator, IThrottlingCache tc, ThrottlingSentinelOptions options)

Parameters

decorator IDecorator<HttpContext>

The IDecorator<T> to extend.

tc IThrottlingCache

The IThrottlingCache implementation.

options ThrottlingSentinelOptions

The configured options.

Returns

Task

InvokeUserAgentSentinelAsync(IDecorator<HttpContext>, UserAgentSentinelOptions)

Common user agent logic for ASP.NET Core and ASP.NET Core MVC. Not intended to be used directly from your code.

public static async Task InvokeUserAgentSentinelAsync(this IDecorator<HttpContext> decorator, UserAgentSentinelOptions options)

Parameters

decorator IDecorator<HttpContext>

The IDecorator<T> to extend.

options UserAgentSentinelOptions

The configured options.

Returns

Task

WriteExceptionDescriptorResponseAsync(IDecorator<HttpContext>, HttpExceptionDescriptorResponseHandler, HttpExceptionDescriptor, CancellationToken)

Invokes and write the result from the specified handler to the response body. Not intended to be used directly from your code.

public static async Task WriteExceptionDescriptorResponseAsync(this IDecorator<HttpContext> decorator, HttpExceptionDescriptorResponseHandler handler, HttpExceptionDescriptor exceptionDescriptor, CancellationToken ct)

Parameters

decorator IDecorator<HttpContext>

The IDecorator<T> to extend.

handler HttpExceptionDescriptorResponseHandler

The HttpExceptionDescriptorResponseHandler that holds the content negotiation response.

exceptionDescriptor HttpExceptionDescriptor

The HttpExceptionDescriptor that provides information about an Exception.

ct CancellationToken

The cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

Task

A Task representing the asynchronous operation.

See Also