DirectoryBrowserMiddleware Constructors

Definition

Overloads

DirectoryBrowserMiddleware(RequestDelegate, IHostingEnvironment, IOptions<DirectoryBrowserOptions>)

Source:
DirectoryBrowserMiddleware.cs
Source:
DirectoryBrowserMiddleware.cs

Creates a new instance of the SendFileMiddleware. Using Default instance.

C#
public DirectoryBrowserMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnv, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.DirectoryBrowserOptions> options);

Parameters

next
RequestDelegate

The next middleware in the pipeline.

hostingEnv
IHostingEnvironment

The IHostingEnvironment used by this middleware.

options
IOptions<DirectoryBrowserOptions>

The configuration for this middleware.

Applies to

ASP.NET Core 2.2 and other versions
Product Versions
ASP.NET Core 1.1, 2.0, 2.1, 2.2

DirectoryBrowserMiddleware(RequestDelegate, IWebHostEnvironment, IOptions<DirectoryBrowserOptions>)

Source:
DirectoryBrowserMiddleware.cs

Creates a new instance of the SendFileMiddleware. Using Default instance.

C#
public DirectoryBrowserMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnv, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.DirectoryBrowserOptions> options);

Parameters

next
RequestDelegate

The next middleware in the pipeline.

hostingEnv
IWebHostEnvironment

The IWebHostEnvironment used by this middleware.

options
IOptions<DirectoryBrowserOptions>

The configuration for this middleware.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

DirectoryBrowserMiddleware(RequestDelegate, IHostingEnvironment, HtmlEncoder, IOptions<DirectoryBrowserOptions>)

Source:
DirectoryBrowserMiddleware.cs
Source:
DirectoryBrowserMiddleware.cs

Creates a new instance of the SendFileMiddleware.

C#
public DirectoryBrowserMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnv, System.Text.Encodings.Web.HtmlEncoder encoder, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.DirectoryBrowserOptions> options);

Parameters

next
RequestDelegate

The next middleware in the pipeline.

hostingEnv
IHostingEnvironment

The IHostingEnvironment used by this middleware.

encoder
HtmlEncoder

The HtmlEncoder used by the default HtmlDirectoryFormatter.

options
IOptions<DirectoryBrowserOptions>

The configuration for this middleware.

Applies to

ASP.NET Core 2.2 and other versions
Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2

DirectoryBrowserMiddleware(RequestDelegate, IWebHostEnvironment, HtmlEncoder, IOptions<DirectoryBrowserOptions>)

Source:
DirectoryBrowserMiddleware.cs

Creates a new instance of the SendFileMiddleware.

C#
public DirectoryBrowserMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnv, System.Text.Encodings.Web.HtmlEncoder encoder, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.DirectoryBrowserOptions> options);

Parameters

next
RequestDelegate

The next middleware in the pipeline.

hostingEnv
IWebHostEnvironment

The IWebHostEnvironment used by this middleware.

encoder
HtmlEncoder

The HtmlEncoder used by the default HtmlDirectoryFormatter.

options
IOptions<DirectoryBrowserOptions>

The configuration for this middleware.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0