ControllerEndpointRouteBuilderExtensions.MapFallbackToAreaController 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String) |
在 中RouteEndpoint加入一個專用IEndpointRouteBuilder碼,能將非檔案名稱的請求匹配到最低優先順序。 請求將被路由到一個與 、 |
| MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String, String) |
在 中RouteEndpoint加入一個專用IEndpointRouteBuilder碼,能將非檔案名稱的請求匹配到最低優先順序。 請求將被路由到一個與 、 |
MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String)
在 中RouteEndpoint加入一個專用IEndpointRouteBuilder碼,能將非檔案名稱的請求匹配到最低優先順序。 請求將被路由到一個與 、 actioncontroller、 相符area的控制器端點。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IEndpointConventionBuilder ^ MapFallbackToAreaController(Microsoft::AspNetCore::Routing::IEndpointRouteBuilder ^ endpoints, System::String ^ action, System::String ^ controller, System::String ^ area);
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToAreaController(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string action, string controller, string area);
static member MapFallbackToAreaController : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * string * string * string -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder
<Extension()>
Public Function MapFallbackToAreaController (endpoints As IEndpointRouteBuilder, action As String, controller As String, area As String) As IEndpointConventionBuilder
參數
- endpoints
- IEndpointRouteBuilder
IEndpointRouteBuilder要把路線加入去。
- action
- String
動作名稱。
- controller
- String
控制器名稱。
- area
- String
區域名稱。
傳回
備註
MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String) 旨在處理請求的 URL 路徑不包含檔案名稱,且沒有其他端點匹配的情況。 這對於將動態內容的請求路由到 SPA 框架很方便,同時也允許對不存在檔案的請求產生 HTTP 404。
MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String) 以模式 {*path:nonfile}註冊端點。 註冊端點的順序為 int.MaxValue。
MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String) 不會重新執行路由,也不會根據其他地方定義的路由產生路由值。 使用此超載時, path 路由值將可用。
MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String)不嘗試辨識多個符合 、 actioncontroller、 area的動作。 若多個動作符合這些值,則為實作定義。
適用於
MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String, String)
在 中RouteEndpoint加入一個專用IEndpointRouteBuilder碼,能將非檔案名稱的請求匹配到最低優先順序。 請求將被路由到一個與 、 actioncontroller、 相符area的控制器端點。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IEndpointConventionBuilder ^ MapFallbackToAreaController(Microsoft::AspNetCore::Routing::IEndpointRouteBuilder ^ endpoints, System::String ^ pattern, System::String ^ action, System::String ^ controller, System::String ^ area);
public static Microsoft.AspNetCore.Builder.IEndpointConventionBuilder MapFallbackToAreaController(this Microsoft.AspNetCore.Routing.IEndpointRouteBuilder endpoints, string pattern, string action, string controller, string area);
static member MapFallbackToAreaController : Microsoft.AspNetCore.Routing.IEndpointRouteBuilder * string * string * string * string -> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder
<Extension()>
Public Function MapFallbackToAreaController (endpoints As IEndpointRouteBuilder, pattern As String, action As String, controller As String, area As String) As IEndpointConventionBuilder
參數
- endpoints
- IEndpointRouteBuilder
IEndpointRouteBuilder要把路線加入去。
- pattern
- String
路線模式。
- action
- String
動作名稱。
- controller
- String
控制器名稱。
- area
- String
區域名稱。
傳回
備註
MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String, String) 旨在處理請求的 URL 路徑不包含檔案名稱,且沒有其他端點匹配的情況。 這對於將動態內容的請求路由到 SPA 框架很方便,同時也允許對不存在檔案的請求產生 HTTP 404。
註冊端點的順序為 int.MaxValue。
這次過載會使用提供的 pattern 原文。 使用 :nonfile 路由限制來排除靜態檔案的請求。
MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String, String) 不會重新執行路由,也不會根據其他地方定義的路由產生路由值。 使用此超載時,匹配所提供的 pattern 路由值將被提供。
MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String, String)不嘗試辨識多個符合 、 actioncontroller、 area的動作。 若多個動作符合這些值,則為實作定義。