Class HttpContextDecoratorExtensions
- Namespace
- Cuemon.AspNetCore.Http
- Assembly
- Cuemon.AspNetCore.dll
Extension methods for the 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 Task InvokeApiKeySentinelAsync(this IDecorator<HttpContext> decorator, ApiKeySentinelOptions options)
Parameters
decoratorIDecorator<HttpContext>The IDecorator<T> to extend.
optionsApiKeySentinelOptionsThe configured options.
Returns
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 Task InvokeThrottlerSentinelAsync(this IDecorator<HttpContext> decorator, IThrottlingCache tc, ThrottlingSentinelOptions options)
Parameters
decoratorIDecorator<HttpContext>The IDecorator<T> to extend.
tcIThrottlingCacheThe IThrottlingCache implementation.
optionsThrottlingSentinelOptionsThe configured options.
Returns
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 Task InvokeUserAgentSentinelAsync(this IDecorator<HttpContext> decorator, UserAgentSentinelOptions options)
Parameters
decoratorIDecorator<HttpContext>The IDecorator<T> to extend.
optionsUserAgentSentinelOptionsThe configured options.
Returns
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 Task WriteExceptionDescriptorResponseAsync(this IDecorator<HttpContext> decorator, HttpExceptionDescriptorResponseHandler handler, HttpExceptionDescriptor exceptionDescriptor, CancellationToken ct)
Parameters
decoratorIDecorator<HttpContext>The IDecorator<T> to extend.
handlerHttpExceptionDescriptorResponseHandlerThe HttpExceptionDescriptorResponseHandler that holds the content negotiation response.
exceptionDescriptorHttpExceptionDescriptorThe HttpExceptionDescriptor that provides information about an Exception.
ctCancellationTokenThe cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task
A Task representing the asynchronous operation.