Share via


LinkGeneratorRouteValuesAddressExtensions.GetPathByRouteValues Method

Definition

Overloads

GetPathByRouteValues(LinkGenerator, String, RouteValueDictionary, PathString, FragmentString, LinkOptions)

Generates a URI with an absolute path based on the provided values.

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

Generates a URI with an absolute path based on the provided values.

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

Generates a URI with an absolute path based on the provided values.

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

Generates a URI with an absolute path based on the provided values.

GetPathByRouteValues(LinkGenerator, String, RouteValueDictionary, PathString, FragmentString, LinkOptions)

Source:
LinkGeneratorRouteValuesAddressExtensions.cs

Generates a URI with an absolute path based on the provided values.

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

Parameters

generator
LinkGenerator

The LinkGenerator.

routeName
String

The route name. Used to resolve endpoints. Optional.

values
RouteValueDictionary

The route values. Used to resolve endpoints and expand parameters in the route template. Optional.

pathBase
PathString

An optional URI path base. Prepended to the path in the resulting URI.

fragment
FragmentString

An optional URI fragment. Appended to the resulting URI.

options
LinkOptions

An optional LinkOptions. Settings on provided object override the settings with matching names from RouteOptions.

Returns

A URI with an absolute path, or null.

Applies to

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

Source:
LinkGeneratorRouteValuesAddressExtensions.cs
Source:
LinkGeneratorRouteValuesAddressExtensions.cs

Generates a URI with an absolute path based on the provided values.

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

Parameters

generator
LinkGenerator

The LinkGenerator.

routeName
String

The route name. Used to resolve endpoints. Optional.

values
Object

The route values. Used to resolve endpoints and expand parameters in the route template. Optional.

pathBase
PathString

An optional URI path base. Prepended to the path in the resulting URI.

fragment
FragmentString

An optional URI fragment. Appended to the resulting URI.

options
LinkOptions

An optional LinkOptions. Settings on provided object override the settings with matching names from RouteOptions.

Returns

A URI with an absolute path, or null.

Applies to

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

Source:
LinkGeneratorRouteValuesAddressExtensions.cs

Generates a URI with an absolute path based on the provided values.

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

Parameters

generator
LinkGenerator

The LinkGenerator.

httpContext
HttpContext

The HttpContext associated with the current request.

routeName
String

The route name. Used to resolve endpoints. Optional.

values
RouteValueDictionary

The route values. Used to resolve endpoints and expand parameters in the route template. Optional.

pathBase
Nullable<PathString>

An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of PathBase will be used.

fragment
FragmentString

An optional URI fragment. Appended to the resulting URI.

options
LinkOptions

An optional LinkOptions. Settings on provided object override the settings with matching names from RouteOptions.

Returns

A URI with an absolute path, or null.

Applies to

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

Source:
LinkGeneratorRouteValuesAddressExtensions.cs
Source:
LinkGeneratorRouteValuesAddressExtensions.cs

Generates a URI with an absolute path based on the provided values.

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

Parameters

generator
LinkGenerator

The LinkGenerator.

httpContext
HttpContext

The HttpContext associated with the current request.

routeName
String

The route name. Used to resolve endpoints. Optional.

values
Object

The route values. Used to resolve endpoints and expand parameters in the route template. Optional.

pathBase
Nullable<PathString>

An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of PathBase will be used.

fragment
FragmentString

An optional URI fragment. Appended to the resulting URI.

options
LinkOptions

An optional LinkOptions. Settings on provided object override the settings with matching names from RouteOptions.

Returns

A URI with an absolute path, or null.

Applies to