Class HostingEnvironmentMiddleware
- Namespace
- Cuemon.AspNetCore.Hosting
- Assembly
- Cuemon.AspNetCore.dll
Provides a hosting environment middleware implementation for ASP.NET Core.
public class HostingEnvironmentMiddleware : ConfigurableMiddleware<IHostEnvironment, HostingEnvironmentOptions>, IConfigurable<HostingEnvironmentOptions>
- Inheritance
-
HostingEnvironmentMiddleware
- Implements
- Inherited Members
Constructors
HostingEnvironmentMiddleware(RequestDelegate, IOptions<HostingEnvironmentOptions>)
Initializes a new instance of the HostingEnvironmentMiddleware class.
public HostingEnvironmentMiddleware(RequestDelegate next, IOptions<HostingEnvironmentOptions> setup)
Parameters
next
RequestDelegateThe delegate of the request pipeline to invoke.
setup
IOptions<HostingEnvironmentOptions>The HostingEnvironmentOptions which need to be configured.
HostingEnvironmentMiddleware(RequestDelegate, Action<HostingEnvironmentOptions>)
Initializes a new instance of the HostingEnvironmentMiddleware class.
public HostingEnvironmentMiddleware(RequestDelegate next, Action<HostingEnvironmentOptions> setup)
Parameters
next
RequestDelegateThe delegate of the request pipeline to invoke.
setup
Action<HostingEnvironmentOptions>The HostingEnvironmentOptions which need to be configured.
Methods
InvokeAsync(HttpContext, IHostEnvironment)
Executes the HostingEnvironmentMiddleware.
public override Task InvokeAsync(HttpContext context, IHostEnvironment di)
Parameters
context
HttpContextThe context of the current request.
di
IHostEnvironmentThe dependency injected IHostEnvironment of InvokeAsync(HttpContext, IHostEnvironment).
Returns
- Task
A task that represents the execution of this middleware.