RazorPagesEndpointRouteBuilderExtensions.MapFallbackToAreaPage 方法

定義

多載

MapFallbackToAreaPage(IEndpointRouteBuilder, String, String)

將特製化 RouteEndpoint 新增至 IEndpointRouteBuilder ,以符合具有最低可能優先順序的非檔案名要求。 要求會路由傳送至符合 page 、 和 area 的頁面端點。

MapFallbackToAreaPage(IEndpointRouteBuilder, String, String, String)

將特製化 RouteEndpoint 新增至 IEndpointRouteBuilder ,以符合具有最低可能優先順序的非檔案名要求。 要求會路由傳送至符合 page 、 和 area 的頁面端點。

MapFallbackToAreaPage(IEndpointRouteBuilder, String, String)

將特製化 RouteEndpoint 新增至 IEndpointRouteBuilder ,以符合具有最低可能優先順序的非檔案名要求。 要求會路由傳送至符合 page 、 和 area 的頁面端點。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IEndpointConventionBuilder ^ MapFallbackToAreaPage(Microsoft::AspNetCore::Routing::IEndpointRouteBuilder ^ endpoints, System::String ^ page, System::String ^ area);
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToAreaPage (this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string page, string area);
static member MapFallbackToAreaPage : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * string * string -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder
<Extension()>
Public Function MapFallbackToAreaPage (endpoints As IEndpointRouteBuilder, page As String, area As String) As IEndpointConventionBuilder

參數

endpoints
IEndpointRouteBuilder

IEndpointRouteBuilder要加入路由的 。

page
String

動作名稱。

area
String

區功能變數名稱稱。

傳回

備註

MapFallbackToAreaPage(IEndpointRouteBuilder, String, String) 是要處理要求 URL 路徑不包含檔案名,且沒有其他端點相符的情況。 這方便將動態內容的要求路由傳送至 SPA 架構,同時允許要求不存在的檔案導致 HTTP 404。

MapFallbackToAreaPage(IEndpointRouteBuilder, String, String) 使用 模式 {*path:nonfile} 註冊端點。 已註冊端點的順序會是 int.MaxValue

MapFallbackToAreaPage(IEndpointRouteBuilder, String, String) 不會重新執行路由,而且不會根據其他地方定義的路由產生路由值。 使用此多載時, path 路由值將可供使用。

適用於

MapFallbackToAreaPage(IEndpointRouteBuilder, String, String, String)

將特製化 RouteEndpoint 新增至 IEndpointRouteBuilder ,以符合具有最低可能優先順序的非檔案名要求。 要求會路由傳送至符合 page 、 和 area 的頁面端點。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IEndpointConventionBuilder ^ MapFallbackToAreaPage(Microsoft::AspNetCore::Routing::IEndpointRouteBuilder ^ endpoints, System::String ^ pattern, System::String ^ page, System::String ^ area);
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToAreaPage (this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, string page, string area);
static member MapFallbackToAreaPage : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * string * string * string -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder
<Extension()>
Public Function MapFallbackToAreaPage (endpoints As IEndpointRouteBuilder, pattern As String, page As String, area As String) As IEndpointConventionBuilder

參數

endpoints
IEndpointRouteBuilder

IEndpointRouteBuilder要加入路由的 。

pattern
String

路由模式。

page
String

動作名稱。

area
String

區功能變數名稱稱。

傳回

備註

MapFallbackToAreaPage(IEndpointRouteBuilder, String, String, String) 是要處理要求 URL 路徑不包含檔案名,且沒有其他端點相符的情況。 這方便將動態內容的要求路由傳送至 SPA 架構,同時允許要求不存在的檔案導致 HTTP 404。

已註冊端點的順序會是 int.MaxValue

此多載會使用所提供的 pattern 逐字。 :nonfile使用路由限制來排除靜態檔案的要求。

MapFallbackToAreaPage(IEndpointRouteBuilder, String, String, String) 不會重新執行路由,而且不會根據其他地方定義的路由產生路由值。 使用此多載時,將會提供比對 pattern 所提供的路由值。

適用於