ControllerEndpointRouteBuilderExtensions.MapFallbackToAreaController 方法

定義

多載

MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String)

將特製化 RouteEndpoint 新增至 IEndpointRouteBuilder ,以符合具有最低可能優先順序的非檔案名要求。 要求會路由傳送至符合 actioncontrollerarea 的控制器端點。

MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String, String)

將特製化 RouteEndpoint 新增至 IEndpointRouteBuilder ,以符合具有最低可能優先順序的非檔案名要求。 要求會路由傳送至符合 actioncontrollerarea 的控制器端點。

MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String)

將特製化 RouteEndpoint 新增至 IEndpointRouteBuilder ,以符合具有最低可能優先順序的非檔案名要求。 要求會路由傳送至符合 actioncontrollerarea 的控制器端點。

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) 不會嘗試區分多個符合所提供 actioncontrollerarea 的動作。 如果多個動作符合這些值,則會定義結果。

適用於

MapFallbackToAreaController(IEndpointRouteBuilder, String, String, String, String)

將特製化 RouteEndpoint 新增至 IEndpointRouteBuilder ,以符合具有最低可能優先順序的非檔案名要求。 要求會路由傳送至符合 actioncontrollerarea 的控制器端點。

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) 不會嘗試區分多個符合所提供 actioncontrollerarea 的動作。 如果多個動作符合這些值,則會定義結果。

適用於