次の方法で共有


LinkGeneratorEndpointNameAddressExtensions.GetUriByName メソッド

定義

オーバーロード

GetUriByName(LinkGenerator, String, RouteValueDictionary, String, HostString, PathString, FragmentString, LinkOptions)

ソース:
LinkGeneratorEndpointNameAddressExtensions.cs

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

public static string? GetUriByName(this Microsoft.AspNetCore.Routing.LinkGenerator generator, string endpointName, 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);
static member GetUriByName : Microsoft.AspNetCore.Routing.LinkGenerator * string * Microsoft.AspNetCore.Routing.RouteValueDictionary * string * Microsoft.AspNetCore.Http.HostString * Microsoft.AspNetCore.Http.PathString * Microsoft.AspNetCore.Http.FragmentString * Microsoft.AspNetCore.Routing.LinkOptions -> string
<Extension()>
Public Function GetUriByName (generator As LinkGenerator, endpointName As String, 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

パラメーター

endpointName
String

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

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 デプロイのドキュメントを参照してください。

適用対象

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

ソース:
LinkGeneratorEndpointNameAddressExtensions.cs
ソース:
LinkGeneratorEndpointNameAddressExtensions.cs

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

public static string? GetUriByName(this Microsoft.AspNetCore.Routing.LinkGenerator generator, string endpointName, 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 GetUriByName(this Microsoft.AspNetCore.Routing.LinkGenerator generator, string endpointName, 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 GetUriByName : Microsoft.AspNetCore.Routing.LinkGenerator * string * obj * string * Microsoft.AspNetCore.Http.HostString * Microsoft.AspNetCore.Http.PathString * Microsoft.AspNetCore.Http.FragmentString * Microsoft.AspNetCore.Routing.LinkOptions -> string
<Extension()>
Public Function GetUriByName (generator As LinkGenerator, endpointName 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

パラメーター

endpointName
String

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

values
Object

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

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 デプロイのドキュメントを参照してください。

適用対象

GetUriByName(LinkGenerator, HttpContext, String, RouteValueDictionary, String, Nullable<HostString>, Nullable<PathString>, FragmentString, LinkOptions)

ソース:
LinkGeneratorEndpointNameAddressExtensions.cs

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

public static string? GetUriByName(this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string endpointName, Microsoft.AspNetCore.Routing.RouteValueDictionary? 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 GetUriByName : Microsoft.AspNetCore.Routing.LinkGenerator * Microsoft.AspNetCore.Http.HttpContext * string * Microsoft.AspNetCore.Routing.RouteValueDictionary * string * Nullable<Microsoft.AspNetCore.Http.HostString> * Nullable<Microsoft.AspNetCore.Http.PathString> * Microsoft.AspNetCore.Http.FragmentString * Microsoft.AspNetCore.Routing.LinkOptions -> string
<Extension()>
Public Function GetUriByName (generator As LinkGenerator, httpContext As HttpContext, endpointName As String, Optional values 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

パラメーター

httpContext
HttpContext

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

endpointName
String

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

values
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 デプロイのドキュメントを参照してください。

適用対象

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

ソース:
LinkGeneratorEndpointNameAddressExtensions.cs
ソース:
LinkGeneratorEndpointNameAddressExtensions.cs

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

public static string? GetUriByName(this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string endpointName, object? values, 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 GetUriByName(this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string endpointName, object values, 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 GetUriByName : Microsoft.AspNetCore.Routing.LinkGenerator * Microsoft.AspNetCore.Http.HttpContext * 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 GetUriByName (generator As LinkGenerator, httpContext As HttpContext, endpointName As String, values As Object, 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 要求に関連付けられている 。

endpointName
String

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

values
Object

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

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 デプロイのドキュメントを参照してください。

適用対象