PageLinkGeneratorExtensions.GetUriByPage メソッド

定義

オーバーロード

GetUriByPage(LinkGenerator, String, String, Object, String, HostString, PathString, FragmentString, LinkOptions)

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

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

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

GetUriByPage(LinkGenerator, String, String, Object, String, HostString, PathString, FragmentString, LinkOptions)

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

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

パラメーター

page
String

ページの名前。 エンドポイントを解決するために使用されます。

handler
String

ページ ハンドラー名。 null も指定できます。

values
Object

ルート値。 null も指定できます。 ルート テンプレートでエンドポイントを解決し、パラメーターを展開するために使用します。

scheme
String

結果の URI に適用される URI スキーム。

host
HostString

結果の URI に適用される URI ホスト/機関。

pathBase
PathString

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

fragment
FragmentString

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

options
LinkOptions

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

戻り値

絶対 URI。URI null を作成できない場合は 。

注釈

host 値は信頼できる値である必要があります。 現在の要求の値に依存すると、ヘッダーが検証されていない限り、信頼されていない入力が結果の URI に影響を Host 与える可能性があります。 デプロイ環境でヘッダーを適切に検証する方法については、 Host デプロイドキュメントを参照してください。

適用対象

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

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

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

パラメーター

httpContext
HttpContext

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

page
String

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

handler
String

ページ ハンドラー名。 エンドポイントを解決するために使用されます。 省略可能。

values
Object

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

scheme
String

結果の URI に適用される URI スキーム。 省略可能。 指定しない場合は、 の Scheme 値が使用されます。

host
Nullable<HostString>

結果の URI に適用される URI ホスト/機関。 省略可能。 指定しない場合は、値 Host が使用されます。

pathBase
Nullable<PathString>

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

fragment
FragmentString

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

options
LinkOptions

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

戻り値

絶対 URI。URI null を作成できない場合は 。

注釈

host 値は信頼できる値である必要があります。 現在の要求の値に依存すると、ヘッダーが検証されていない限り、信頼されていない入力が結果の URI に影響を Host 与える可能性があります。 デプロイ環境でヘッダーを適切に検証する方法については、 Host デプロイドキュメントを参照してください。

適用対象