Class HostingEnvironmentMiddleware
Provides a hosting environment middleware implementation for ASP.NET Core.
Inheritance
System.Object
HostingEnvironmentMiddleware
Implements
Inherited Members
Namespace: Cuemon.AspNetCore.Hosting
Assembly: Cuemon.AspNetCore.dll
Syntax
public class HostingEnvironmentMiddleware : ConfigurableMiddleware<IHostingEnvironment, HostingEnvironmentOptions>, IConfigurable<HostingEnvironmentOptions>
Constructors
| Improve this DocHostingEnvironmentMiddleware(RequestDelegate, IOptions<HostingEnvironmentOptions>)
Initializes a new instance of the HostingEnvironmentMiddleware class.
Declaration
public HostingEnvironmentMiddleware(RequestDelegate next, IOptions<HostingEnvironmentOptions> setup)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.RequestDelegate | next | The delegate of the request pipeline to invoke. |
Microsoft.Extensions.Options.IOptions<HostingEnvironmentOptions> | setup | The HostingEnvironmentOptions which need to be configured. |
HostingEnvironmentMiddleware(RequestDelegate, Action<HostingEnvironmentOptions>)
Initializes a new instance of the HostingEnvironmentMiddleware class.
Declaration
public HostingEnvironmentMiddleware(RequestDelegate next, Action<HostingEnvironmentOptions> setup)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.RequestDelegate | next | The delegate of the request pipeline to invoke. |
System.Action<HostingEnvironmentOptions> | setup | The HostingEnvironmentOptions which need to be configured. |
Methods
| Improve this DocInvokeAsync(HttpContext, IHostingEnvironment)
Executes the HostingEnvironmentMiddleware.
Declaration
public override Task InvokeAsync(HttpContext context, IHostingEnvironment he)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.HttpContext | context | The context of the current request. |
Microsoft.Extensions.Hosting.IHostingEnvironment | he | The dependency injected Microsoft.Extensions.Hosting.IHostingEnvironment of InvokeAsync(HttpContext, IHostingEnvironment). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the execution of this middleware. |
Overrides
Cuemon.AspNetCore.ConfigurableMiddleware<Microsoft.Extensions.Hosting.IHostingEnvironment, Cuemon.AspNetCore.Hosting.HostingEnvironmentOptions>.InvokeAsync(Microsoft.AspNetCore.Http.HttpContext, Microsoft.Extensions.Hosting.IHostingEnvironment)