DefaultFilesExtensions.UseDefaultFiles 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
UseDefaultFiles(IApplicationBuilder) |
在当前路径上启用默认文件映射 |
UseDefaultFiles(IApplicationBuilder, DefaultFilesOptions) |
使用给定的选项启用默认文件映射 |
UseDefaultFiles(IApplicationBuilder, String) |
为给定请求路径启用默认文件映射 |
UseDefaultFiles(IApplicationBuilder)
- Source:
- DefaultFilesExtensions.cs
- Source:
- DefaultFilesExtensions.cs
- Source:
- DefaultFilesExtensions.cs
在当前路径上启用默认文件映射
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseDefaultFiles(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseDefaultFiles (this Microsoft.AspNetCore.Builder.IApplicationBuilder app);
static member UseDefaultFiles : Microsoft.AspNetCore.Builder.IApplicationBuilder -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseDefaultFiles (app As IApplicationBuilder) As IApplicationBuilder
参数
返回
注解
文件从 或 WebRootFileProvider 中指定的WebRootPath路径提供,默认为“wwwroot”子文件夹。
适用于
UseDefaultFiles(IApplicationBuilder, DefaultFilesOptions)
- Source:
- DefaultFilesExtensions.cs
- Source:
- DefaultFilesExtensions.cs
- Source:
- DefaultFilesExtensions.cs
使用给定的选项启用默认文件映射
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseDefaultFiles(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Microsoft::AspNetCore::Builder::DefaultFilesOptions ^ options);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseDefaultFiles (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Microsoft.AspNetCore.Builder.DefaultFilesOptions options);
static member UseDefaultFiles : Microsoft.AspNetCore.Builder.IApplicationBuilder * Microsoft.AspNetCore.Builder.DefaultFilesOptions -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseDefaultFiles (app As IApplicationBuilder, options As DefaultFilesOptions) As IApplicationBuilder
参数
- options
- DefaultFilesOptions
返回
适用于
UseDefaultFiles(IApplicationBuilder, String)
- Source:
- DefaultFilesExtensions.cs
- Source:
- DefaultFilesExtensions.cs
- Source:
- DefaultFilesExtensions.cs
为给定请求路径启用默认文件映射
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseDefaultFiles(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, System::String ^ requestPath);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseDefaultFiles (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, string requestPath);
static member UseDefaultFiles : Microsoft.AspNetCore.Builder.IApplicationBuilder * string -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseDefaultFiles (app As IApplicationBuilder, requestPath As String) As IApplicationBuilder
参数
- requestPath
- String
相对请求路径。
返回
注解
文件从 或 WebRootFileProvider 中指定的WebRootPath路径提供,默认为“wwwroot”子文件夹。