ControllerLinkGeneratorExtensions.GetPathByAction メソッド

定義

オーバーロード

GetPathByAction(LinkGenerator, String, String, Object, PathString, FragmentString, LinkOptions)

指定された値に基づき、絶対パスを含む URI を生成します。

GetPathByAction(LinkGenerator, HttpContext, String, String, Object, Nullable<PathString>, FragmentString, LinkOptions)

指定された値に基づき、絶対パスを含む URI を生成します。

GetPathByAction(LinkGenerator, String, String, Object, PathString, FragmentString, LinkOptions)

指定された値に基づき、絶対パスを含む URI を生成します。

public static string GetPathByAction (this Microsoft.AspNetCore.Routing.LinkGenerator generator, string action, string controller, object values = default, Microsoft.AspNetCore.Http.PathString pathBase = default, Microsoft.AspNetCore.Http.FragmentString fragment = default, Microsoft.AspNetCore.Routing.LinkOptions options = default);
public static string? GetPathByAction (this Microsoft.AspNetCore.Routing.LinkGenerator generator, string action, string controller, object? values = default, Microsoft.AspNetCore.Http.PathString pathBase = default, Microsoft.AspNetCore.Http.FragmentString fragment = default, Microsoft.AspNetCore.Routing.LinkOptions? options = default);
static member GetPathByAction : Microsoft.AspNetCore.Routing.LinkGenerator * string * string * obj * Microsoft.AspNetCore.Http.PathString * Microsoft.AspNetCore.Http.FragmentString * Microsoft.AspNetCore.Routing.LinkOptions -> string
<Extension()>
Public Function GetPathByAction (generator As LinkGenerator, action As String, controller As String, Optional values As Object = Nothing, Optional pathBase As PathString = Nothing, Optional fragment As FragmentString = Nothing, Optional options As LinkOptions = Nothing) As String

パラメーター

action
String

アクション名。 エンドポイントを解決するために使用されます。

controller
String

コントローラー名。 エンドポイントを解決するために使用されます。

values
Object

ルート値。 省略可能。 ルート テンプレートでエンドポイントを解決し、パラメーターを展開するために使用します。

pathBase
PathString

省略可能な URI パスベース。 結果の URI のパスの前に追加されます。

fragment
FragmentString

URI フラグメント。 省略可能。 結果の URI に追加されます。

options
LinkOptions

オプションの LinkOptions。 指定されたオブジェクトの設定は、 の RouteOptions名前が一致する設定をオーバーライドします。

戻り値

絶対パスを持つ URI、または null URI を作成できない場合は 。

適用対象

GetPathByAction(LinkGenerator, HttpContext, String, String, Object, Nullable<PathString>, FragmentString, LinkOptions)

指定された値に基づき、絶対パスを含む URI を生成します。

public static string GetPathByAction (this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string action = default, string controller = default, object values = default, Microsoft.AspNetCore.Http.PathString? pathBase = default, Microsoft.AspNetCore.Http.FragmentString fragment = default, Microsoft.AspNetCore.Routing.LinkOptions options = default);
public static string? GetPathByAction (this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string? action = default, string? controller = default, object? values = default, Microsoft.AspNetCore.Http.PathString? pathBase = default, Microsoft.AspNetCore.Http.FragmentString fragment = default, Microsoft.AspNetCore.Routing.LinkOptions? options = default);
static member GetPathByAction : Microsoft.AspNetCore.Routing.LinkGenerator * Microsoft.AspNetCore.Http.HttpContext * string * string * obj * Nullable<Microsoft.AspNetCore.Http.PathString> * Microsoft.AspNetCore.Http.FragmentString * Microsoft.AspNetCore.Routing.LinkOptions -> string
<Extension()>
Public Function GetPathByAction (generator As LinkGenerator, httpContext As HttpContext, Optional action As String = Nothing, Optional controller As String = Nothing, Optional values As Object = Nothing, Optional pathBase As Nullable(Of PathString) = Nothing, Optional fragment As FragmentString = Nothing, Optional options As LinkOptions = Nothing) As String

パラメーター

httpContext
HttpContext

現在の HttpContext 要求に関連付けられている 。

action
String

アクション名。 エンドポイントを解決するために使用されます。 省略可能。 が指定されている場合 null は、現在のアクション ルート値が使用されます。

controller
String

コントローラー名。 エンドポイントを解決するために使用されます。 省略可能。 が指定されている場合 null は、現在のコントローラー ルート値が使用されます。

values
Object

ルート値。 省略可能。 ルート テンプレートでエンドポイントを解決し、パラメーターを展開するために使用します。

pathBase
Nullable<PathString>

省略可能な URI パスベース。 結果の URI のパスの前に追加されます。 指定しない場合は、 の PathBase 値が使用されます。

fragment
FragmentString

URI フラグメント。 省略可能。 結果の URI に追加されます。

options
LinkOptions

オプションの LinkOptions。 指定されたオブジェクトの設定は、 の RouteOptions名前が一致する設定をオーバーライドします。

戻り値

絶対パスを持つ URI、または null URI を作成できない場合は 。

適用対象