ControllerLinkGeneratorExtensions.GetUriByAction ControllerLinkGeneratorExtensions.GetUriByAction ControllerLinkGeneratorExtensions.GetUriByAction Method

Definition

Overloads

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

Generates an absolute URI based on the provided values.

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

Generates an absolute URI based on the provided values.

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

Generates an absolute URI based on the provided values.

public static string GetUriByAction (this Microsoft.AspNetCore.Routing.LinkGenerator generator, string action, string controller, object values, string scheme, Microsoft.AspNetCore.Http.HostString host, Microsoft.AspNetCore.Http.PathString pathBase = null, Microsoft.AspNetCore.Http.FragmentString fragment = null, Microsoft.AspNetCore.Routing.LinkOptions options = null);
static member GetUriByAction : 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 GetUriByAction (generator As LinkGenerator, action As String, controller As String, values As Object, scheme As String, host As HostString, Optional pathBase As PathString = null, Optional fragment As FragmentString = null, Optional options As LinkOptions = null) As String

Parameters

action
String String String

The action name. Used to resolve endpoints.

controller
String String String

The controller name. Used to resolve endpoints.

values
Object Object Object

The route values. May be null. Used to resolve endpoints and expand parameters in the route template.

scheme
String String String

The URI scheme, applied to the resulting URI.

host
HostString HostString HostString

The URI host/authority, applied to the resulting URI.

pathBase
PathString PathString PathString

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

fragment
FragmentString FragmentString FragmentString

A URI fragment. Optional. Appended to the resulting URI.

options
LinkOptions LinkOptions LinkOptions

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

Returns

A absolute URI, or null if a URI cannot be created.

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

Generates an absolute URI based on the provided values.

public static string GetUriByAction (this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string action = null, string controller = null, object values = null, string scheme = null, Nullable<Microsoft.AspNetCore.Http.HostString> host = null, Nullable<Microsoft.AspNetCore.Http.PathString> pathBase = null, Microsoft.AspNetCore.Http.FragmentString fragment = null, Microsoft.AspNetCore.Routing.LinkOptions options = null);
static member GetUriByAction : 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

Parameters

httpContext
HttpContext HttpContext HttpContext

The HttpContext associated with the current request.

action
String String String

The action name. Used to resolve endpoints. Optional. If null is provided, the current action route value will be used.

controller
String String String

The controller name. Used to resolve endpoints. Optional. If null is provided, the current controller route value will be used.

values
Object Object Object

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

scheme
String String String

The URI scheme, applied to the resulting URI. Optional. If not provided, the value of Scheme will be used.

host
Nullable<HostString>

The URI host/authority, applied to the resulting URI. Optional. If not provided, the value Host will be used.

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 FragmentString FragmentString

A URI fragment. Optional. Appended to the resulting URI.

options
LinkOptions LinkOptions LinkOptions

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

Returns

A absolute URI, or null if a URI cannot be created.

Applies to