LinkGenerator Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines a contract to generate absolute and related URIs based on endpoint routing.
public ref class LinkGenerator abstract
public abstract class LinkGenerator
type LinkGenerator = class
Public MustInherit Class LinkGenerator
- Inheritance
-
LinkGenerator
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() |
Methods
GetPathByAddress<TAddress>(HttpContext, TAddress, RouteValueDictionary, RouteValueDictionary, Nullable<PathString>, FragmentString, LinkOptions) |
Generates a URI with an absolute path based on the provided values and HttpContext. |
GetPathByAddress<TAddress>(TAddress, RouteValueDictionary, PathString, FragmentString, LinkOptions) |
Generates a URI with an absolute path based on the provided values. |
GetUriByAddress<TAddress>(HttpContext, TAddress, RouteValueDictionary, RouteValueDictionary, String, Nullable<HostString>, Nullable<PathString>, FragmentString, LinkOptions) |
Generates an absolute URI based on the provided values and HttpContext. |
GetUriByAddress<TAddress>(TAddress, RouteValueDictionary, String, HostString, PathString, FragmentString, LinkOptions) |
Generates an absolute URI based on the provided values. |
Extension Methods
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for