LinkGenerator LinkGenerator LinkGenerator Class

Definition

Defines a contract to generate absolute and related URIs based on endpoint routing.

public abstract class LinkGenerator
type LinkGenerator = class
Public MustInherit Class LinkGenerator
Inheritance
LinkGeneratorLinkGeneratorLinkGenerator

Remarks

Generating URIs in endpoint routing occurs in two phases. First, an address is bound to a list of endpoints that match the address. Secondly, each endpoint's RoutePattern is evaluated, until a route pattern that matches the supplied values is found. The resulting output is combined with the other URI parts supplied to the link generator and returned.

The methods provided by the LinkGenerator type are general infrastructure, and support the standard link generator functionality for any type of address. The most convenient way to use LinkGenerator is through extension methods that perform operations for a specific address type.

Constructors

LinkGenerator() LinkGenerator() LinkGenerator()

Methods

GetPathByAddress<TAddress>(TAddress, RouteValueDictionary, PathString, FragmentString, LinkOptions) GetPathByAddress<TAddress>(TAddress, RouteValueDictionary, PathString, FragmentString, LinkOptions) GetPathByAddress<TAddress>(TAddress, RouteValueDictionary, PathString, FragmentString, LinkOptions)

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

GetPathByAddress<TAddress>(HttpContext, TAddress, RouteValueDictionary, RouteValueDictionary, Nullable<PathString>, FragmentString, LinkOptions) GetPathByAddress<TAddress>(HttpContext, TAddress, RouteValueDictionary, RouteValueDictionary, Nullable<PathString>, FragmentString, LinkOptions) GetPathByAddress<TAddress>(HttpContext, TAddress, RouteValueDictionary, RouteValueDictionary, Nullable<PathString>, FragmentString, LinkOptions)

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

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

Generates an absolute URI based on the provided values.

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

Generates an absolute URI based on the provided values and HttpContext.

Extension Methods

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

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

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

Generates a URI with an absolute path 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) 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.

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

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

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

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

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

Generates an absolute URI based on the provided values.

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

Generates an absolute URI based on the provided values.

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

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

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

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

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

Generates an absolute URI based on the provided values.

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

Generates an absolute URI based on the provided values.

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

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

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

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

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

Generates an absolute URI based on the provided values.

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

Generates an absolute URI based on the provided values.

Applies to