Language

ControllerEndpointRouteBuilderExtensions.MapFallbackToController メソッド

定義

オーバーロード

Name 説明
MapFallbackToController(IEndpointRouteBuilder, String, String)

優先度が最も低いファイル名以外の要求と一致する特殊な RouteEndpoint を IEndpointRouteBuilder に追加します。 要求は、 actionと一致するコントローラー エンドポイントにルーティングされ、 controllerされます。

MapFallbackToController(IEndpointRouteBuilder, String, String, String)

優先度が最も低いファイル名以外の要求と一致する特殊な RouteEndpoint を IEndpointRouteBuilder に追加します。 要求は、 actionと一致するコントローラー エンドポイントにルーティングされ、 controllerされます。

MapFallbackToController(IEndpointRouteBuilder, String, String)

ソース:
ControllerEndpointRouteBuilderExtensions.cs

優先度が最も低いファイル名以外の要求と一致する特殊な RouteEndpoint を IEndpointRouteBuilder に追加します。 要求は、 actionと一致するコントローラー エンドポイントにルーティングされ、 controllerされます。

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

パラメーター

endpoints
IEndpointRouteBuilder

ルートを追加する IEndpointRouteBuilder 。

action
String

そのアクション名。

controller
String

コントローラー名。

返品

注釈

MapFallbackToController(IEndpointRouteBuilder, String, String) は、要求の URL パスにファイル名が含まれず、他のエンドポイントが一致していない場合を処理することを目的としています。 これは、動的コンテンツの要求を SPA フレームワークにルーティングする一方で、存在しないファイルの要求が HTTP 404 になる場合にも便利です。

MapFallbackToController(IEndpointRouteBuilder, String, String) は、パターン {*path:nonfile}を使用してエンドポイントを登録します。 登録されたエンドポイントの順序が int.MaxValueされます。

MapFallbackToController(IEndpointRouteBuilder, String, String) はルーティングを再実行せず、他の場所で定義されているルートに基づいてルート値を生成しません。 このオーバーロードを使用すると、 path ルート値が使用可能になります。

MapFallbackToController(IEndpointRouteBuilder, String, String) は、指定された action と controllerに一致する複数のアクションの間であいまいさを解消しようとしません。 複数のアクションがこれらの値と一致する場合、結果は実装定義されます。

適用対象

MapFallbackToController(IEndpointRouteBuilder, String, String, String)

ソース:
ControllerEndpointRouteBuilderExtensions.cs

優先度が最も低いファイル名以外の要求と一致する特殊な RouteEndpoint を IEndpointRouteBuilder に追加します。 要求は、 actionと一致するコントローラー エンドポイントにルーティングされ、 controllerされます。

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

パラメーター

endpoints
IEndpointRouteBuilder

ルートを追加する IEndpointRouteBuilder 。

pattern
String

ルート パターン。

action
String

そのアクション名。

controller
String

コントローラー名。

返品

注釈

MapFallbackToController(IEndpointRouteBuilder, String, String, String) は、要求の URL パスにファイル名が含まれず、他のエンドポイントが一致していない場合を処理することを目的としています。 これは、動的コンテンツの要求を SPA フレームワークにルーティングする一方で、存在しないファイルの要求が HTTP 404 になる場合にも便利です。

登録されたエンドポイントの順序が int.MaxValueされます。

このオーバーロードでは、指定された pattern 逐語的に使用されます。 静的ファイルの要求を除外するには、 :nonfile ルート制約を使用します。

MapFallbackToController(IEndpointRouteBuilder, String, String, String) はルーティングを再実行せず、他の場所で定義されているルートに基づいてルート値を生成しません。 このオーバーロードを使用する場合は、一致する pattern によって提供されるルート値を使用できます。

MapFallbackToController(IEndpointRouteBuilder, String, String, String) は、指定された action と controllerに一致する複数のアクションの間であいまいさを解消しようとしません。 複数のアクションがこれらの値と一致する場合、結果は実装定義されます。

適用対象