LinkGeneratorEndpointNameAddressExtensions.GetPathByName Method

Definition

Overloads

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

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

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

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

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

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

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

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

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

Source:
LinkGeneratorEndpointNameAddressExtensions.cs

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

public static string? GetPathByName (this Microsoft.AspNetCore.Routing.LinkGenerator generator, string endpointName, 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 GetPathByName : 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 GetPathByName (generator As LinkGenerator, endpointName 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.

endpointName
String

The endpoint name. Used to resolve endpoints.

values
RouteValueDictionary

The route values. Used to 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

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

Source:
LinkGeneratorEndpointNameAddressExtensions.cs
Source:
LinkGeneratorEndpointNameAddressExtensions.cs

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

public static string GetPathByName (this Microsoft.AspNetCore.Routing.LinkGenerator generator, string endpointName, object values, Microsoft.AspNetCore.Http.PathString pathBase = default, Microsoft.AspNetCore.Http.FragmentString fragment = default, Microsoft.AspNetCore.Routing.LinkOptions options = default);
public static string? GetPathByName (this Microsoft.AspNetCore.Routing.LinkGenerator generator, string endpointName, object? values, Microsoft.AspNetCore.Http.PathString pathBase = default, Microsoft.AspNetCore.Http.FragmentString fragment = default, Microsoft.AspNetCore.Routing.LinkOptions? options = default);
static member GetPathByName : Microsoft.AspNetCore.Routing.LinkGenerator * string * obj * Microsoft.AspNetCore.Http.PathString * Microsoft.AspNetCore.Http.FragmentString * Microsoft.AspNetCore.Routing.LinkOptions -> string
<Extension()>
Public Function GetPathByName (generator As LinkGenerator, endpointName 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.

endpointName
String

The endpoint name. Used to resolve endpoints.

values
Object

The route values. Used to 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

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

Source:
LinkGeneratorEndpointNameAddressExtensions.cs

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

public static string? GetPathByName (this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string endpointName, 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 GetPathByName : 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 GetPathByName (generator As LinkGenerator, httpContext As HttpContext, endpointName 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.

endpointName
String

The endpoint name. Used to resolve endpoints.

values
RouteValueDictionary

The route values. Used to 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

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

Source:
LinkGeneratorEndpointNameAddressExtensions.cs
Source:
LinkGeneratorEndpointNameAddressExtensions.cs

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

public static string GetPathByName (this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string endpointName, object values, Microsoft.AspNetCore.Http.PathString? pathBase = default, Microsoft.AspNetCore.Http.FragmentString fragment = default, Microsoft.AspNetCore.Routing.LinkOptions options = default);
public static string? GetPathByName (this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string endpointName, object? values, Microsoft.AspNetCore.Http.PathString? pathBase = default, Microsoft.AspNetCore.Http.FragmentString fragment = default, Microsoft.AspNetCore.Routing.LinkOptions? options = default);
static member GetPathByName : 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 GetPathByName (generator As LinkGenerator, httpContext As HttpContext, endpointName 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.

endpointName
String

The endpoint name. Used to resolve endpoints.

values
Object

The route values. Used to 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