StaticFileExtensions.UseStaticFiles 方法

定义

重载

UseStaticFiles(IApplicationBuilder)

为当前请求路径启用静态文件服务

UseStaticFiles(IApplicationBuilder, StaticFileOptions)

使用给定的选项启用静态文件提供

UseStaticFiles(IApplicationBuilder, String)

为给定请求路径启用静态文件服务

UseStaticFiles(IApplicationBuilder)

为当前请求路径启用静态文件服务

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseStaticFiles(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStaticFiles (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseStaticFiles : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseStaticFiles (app As IApplicationBuilder) As IApplicationBuilder

参数

返回

IApplicationBuilder

适用于

UseStaticFiles(IApplicationBuilder, StaticFileOptions)

使用给定的选项启用静态文件提供

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseStaticFiles(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Builder::StaticFileOptions ^ options);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStaticFiles (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.StaticFileOptions options);
static member UseStaticFiles : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Builder.StaticFileOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseStaticFiles (app As IApplicationBuilder, options As StaticFileOptions) As IApplicationBuilder

参数

返回

IApplicationBuilder

适用于

UseStaticFiles(IApplicationBuilder, String)

为给定请求路径启用静态文件服务

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseStaticFiles(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, System::String ^ requestPath);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseStaticFiles (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string requestPath);
static member UseStaticFiles : Microsoft.AspNetCore.Builder.IApplicationBuilder * string -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseStaticFiles (app As IApplicationBuilder, requestPath As String) As IApplicationBuilder

参数

requestPath
String

相对请求路径。

返回

IApplicationBuilder

适用于