Class ConfigurableMiddleware<T1, T2, T3, T4, T5, TOptions>
- Namespace
- Cuemon.AspNetCore
- Assembly
- Cuemon.AspNetCore.dll
Provides an base-class for configurable middleware implementation in ASP.NET Core that supports the options pattern with five dependency injected parameters.
public abstract class ConfigurableMiddleware<T1, T2, T3, T4, T5, TOptions> : ConfigurableMiddlewareCore<TOptions>, IConfigurable<TOptions> where TOptions : class, IParameterObject, new()Type Parameters
- T1
- The type of the first dependency injected parameter of InvokeAsync(HttpContext, T1, T2, T3, T4, T5). 
- T2
- The type of the second dependency injected parameter of InvokeAsync(HttpContext, T1, T2, T3, T4, T5). 
- T3
- The type of the third dependency injected parameter of InvokeAsync(HttpContext, T1, T2, T3, T4, T5). 
- T4
- The type of the fourth dependency injected parameter of InvokeAsync(HttpContext, T1, T2, T3, T4, T5). 
- T5
- The type of the fifth dependency injected parameter of InvokeAsync(HttpContext, T1, T2, T3, T4, T5). 
- TOptions
- The type of the options to setup. 
- Inheritance
- 
      
      
      ConfigurableMiddlewareCore<TOptions>ConfigurableMiddleware<T1, T2, T3, T4, T5, TOptions>
- Implements
- 
      IConfigurable<TOptions>
- Inherited Members
Constructors
ConfigurableMiddleware(RequestDelegate, IOptions<TOptions>)
Initializes a new instance of the ConfigurableMiddleware<TOptions> class.
protected ConfigurableMiddleware(RequestDelegate next, IOptions<TOptions> setup)Parameters
- nextRequestDelegate
- The delegate of the request pipeline to invoke. 
- setupIOptions<TOptions>
- The IOptions<TOptions> which need to be configured. 
ConfigurableMiddleware(RequestDelegate, Action<TOptions>)
Initializes a new instance of the ConfigurableMiddleware<TOptions> class.
protected ConfigurableMiddleware(RequestDelegate next, Action<TOptions> setup)Parameters
- nextRequestDelegate
- The delegate of the request pipeline to invoke. 
- setupAction<TOptions>
- The Action<T> which need to be configured. 
Methods
InvokeAsync(HttpContext, T1, T2, T3, T4, T5)
Executes the ConfigurableMiddleware<T1, T2, T3, T4, T5, TOptions>.
public abstract Task InvokeAsync(HttpContext context, T1 di1, T2 di2, T3 di3, T4 di4, T5 di5)Parameters
- contextHttpContext
- The context of the current request. 
- di1T1
- The first dependency injected parameter of InvokeAsync(HttpContext, T1, T2, T3, T4, T5). 
- di2T2
- The second dependency injected parameter of InvokeAsync(HttpContext, T1, T2, T3, T4, T5). 
- di3T3
- The third dependency injected parameter of InvokeAsync(HttpContext, T1, T2, T3, T4, T5). 
- di4T4
- The fourth dependency injected parameter of InvokeAsync(HttpContext, T1, T2, T3, T4, T5). 
- di5T5
- The fifth dependency injected parameter of InvokeAsync(HttpContext, T1, T2, T3, T4, T5). 
Returns
- Task
- A task that represents the execution of this middleware.