StaticFileMiddleware 构造函数

定义

重载

StaticFileMiddleware(RequestDelegate, IHostingEnvironment, IOptions<StaticFileOptions>, ILoggerFactory)

创建 StaticFileMiddleware 的新实例。

StaticFileMiddleware(RequestDelegate, IWebHostEnvironment, IOptions<StaticFileOptions>, ILoggerFactory)

创建 StaticFileMiddleware 的新实例。

StaticFileMiddleware(RequestDelegate, IHostingEnvironment, IOptions<StaticFileOptions>, ILoggerFactory)

Source:
StaticFileMiddleware.cs
Source:
StaticFileMiddleware.cs

创建 StaticFileMiddleware 的新实例。

public:
 StaticFileMiddleware(Microsoft::AspNetCore::Http::RequestDelegate ^ next, Microsoft::AspNetCore::Hosting::IHostingEnvironment ^ hostingEnv, Microsoft::Extensions::Options::IOptions<Microsoft::AspNetCore::Builder::StaticFileOptions ^> ^ options, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory);
public StaticFileMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnv, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.StaticFileOptions> options, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
new Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware : Microsoft.AspNetCore.Http.RequestDelegate * Microsoft.AspNetCore.Hosting.IHostingEnvironment * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.StaticFileOptions> * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware
Public Sub New (next As RequestDelegate, hostingEnv As IHostingEnvironment, options As IOptions(Of StaticFileOptions), loggerFactory As ILoggerFactory)

参数

next
RequestDelegate

管道中的下一个中间件。

hostingEnv
IHostingEnvironment

IHostingEnvironment此中间件使用的 。

options
IOptions<StaticFileOptions>

配置选项。

loggerFactory
ILoggerFactory

ILoggerFactory用于创建记录器的实例。

适用于

StaticFileMiddleware(RequestDelegate, IWebHostEnvironment, IOptions<StaticFileOptions>, ILoggerFactory)

Source:
StaticFileMiddleware.cs

创建 StaticFileMiddleware 的新实例。

public:
 StaticFileMiddleware(Microsoft::AspNetCore::Http::RequestDelegate ^ next, Microsoft::AspNetCore::Hosting::IWebHostEnvironment ^ hostingEnv, Microsoft::Extensions::Options::IOptions<Microsoft::AspNetCore::Builder::StaticFileOptions ^> ^ options, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory);
public StaticFileMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnv, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.StaticFileOptions> options, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
new Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware : Microsoft.AspNetCore.Http.RequestDelegate * Microsoft.AspNetCore.Hosting.IWebHostEnvironment * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.StaticFileOptions> * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware
Public Sub New (next As RequestDelegate, hostingEnv As IWebHostEnvironment, options As IOptions(Of StaticFileOptions), loggerFactory As ILoggerFactory)

参数

next
RequestDelegate

管道中的下一个中间件。

hostingEnv
IWebHostEnvironment

IWebHostEnvironment此中间件使用的 。

options
IOptions<StaticFileOptions>

配置选项。

loggerFactory
ILoggerFactory

ILoggerFactory用于创建记录器的实例。

适用于