LinkGenerator.GetUriByAddress メソッド

定義

オーバーロード

GetUriByAddress<TAddress>(TAddress, RouteValueDictionary, String, HostString, PathString, FragmentString, LinkOptions)

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

GetUriByAddress<TAddress>(HttpContext, TAddress, RouteValueDictionary, RouteValueDictionary, String, Nullable<HostString>, Nullable<PathString>, FragmentString, LinkOptions)

指定された値と HttpContextに基づいて絶対 URI を生成します。

GetUriByAddress<TAddress>(TAddress, RouteValueDictionary, String, HostString, PathString, FragmentString, LinkOptions)

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

public abstract string GetUriByAddress<TAddress> (TAddress address, Microsoft.AspNetCore.Routing.RouteValueDictionary 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 abstract string? GetUriByAddress<TAddress> (TAddress address, Microsoft.AspNetCore.Routing.RouteValueDictionary 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 abstract string? GetUriByAddress<TAddress> (TAddress address, Microsoft.AspNetCore.Routing.RouteValueDictionary 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);
abstract member GetUriByAddress : 'Address * Microsoft.AspNetCore.Routing.RouteValueDictionary * string * Microsoft.AspNetCore.Http.HostString * Microsoft.AspNetCore.Http.PathString * Microsoft.AspNetCore.Http.FragmentString * Microsoft.AspNetCore.Routing.LinkOptions -> string
Public MustOverride Function GetUriByAddress(Of TAddress) (address As TAddress, values As RouteValueDictionary, scheme As String, host As HostString, Optional pathBase As PathString = Nothing, Optional fragment As FragmentString = Nothing, Optional options As LinkOptions = Nothing) As String

型パラメーター

TAddress

アドレスの種類。

パラメーター

address
TAddress

アドレス値。 エンドポイントを解決するために使用されます。

values
RouteValueDictionary

ルート値。 ルート テンプレートのパラメーターを展開するために使用します。

scheme
String

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

host
HostString

結果の URI に適用される URI ホスト/機関。 のセキュリティへの影響の詳細については、「解説」セクションを host参照してください。

pathBase
PathString

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

fragment
FragmentString

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

options
LinkOptions

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

戻り値

絶対 URI または null

注釈

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

適用対象

GetUriByAddress<TAddress>(HttpContext, TAddress, RouteValueDictionary, RouteValueDictionary, String, Nullable<HostString>, Nullable<PathString>, FragmentString, LinkOptions)

指定された値と HttpContextに基づいて絶対 URI を生成します。

public abstract string GetUriByAddress<TAddress> (Microsoft.AspNetCore.Http.HttpContext httpContext, TAddress address, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteValueDictionary ambientValues = 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 abstract string? GetUriByAddress<TAddress> (Microsoft.AspNetCore.Http.HttpContext httpContext, TAddress address, Microsoft.AspNetCore.Routing.RouteValueDictionary values, Microsoft.AspNetCore.Routing.RouteValueDictionary? ambientValues = 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);
abstract member GetUriByAddress : Microsoft.AspNetCore.Http.HttpContext * 'Address * Microsoft.AspNetCore.Routing.RouteValueDictionary * Microsoft.AspNetCore.Routing.RouteValueDictionary * string * Nullable<Microsoft.AspNetCore.Http.HostString> * Nullable<Microsoft.AspNetCore.Http.PathString> * Microsoft.AspNetCore.Http.FragmentString * Microsoft.AspNetCore.Routing.LinkOptions -> string
Public MustOverride Function GetUriByAddress(Of TAddress) (httpContext As HttpContext, address As TAddress, values As RouteValueDictionary, Optional ambientValues As RouteValueDictionary = 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

型パラメーター

TAddress

アドレスの種類。

パラメーター

httpContext
HttpContext

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

address
TAddress

アドレス値。 エンドポイントを解決するために使用されます。

values
RouteValueDictionary

ルート値。 ルート テンプレートのパラメーターを展開するために使用します。

ambientValues
RouteValueDictionary

現在の要求に関連付けられている値。 省略可能。

scheme
String

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

host
Nullable<HostString>

結果の URI に適用される URI ホスト/機関。 省略可能。 指定しない場合は、値 Host が使用されます。 のセキュリティへの影響の詳細については、「解説」セクションを host参照してください。

pathBase
Nullable<PathString>

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

fragment
FragmentString

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

options
LinkOptions

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

戻り値

絶対パス () nullを持つ URI。

注釈

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

適用対象