Try our conversational search powered by Generative AI!

Class UrlGeneratorContext

The context that is used during url generation. Different IUrlGeneratorPipelineStep instances in the pipeline can update the Url depending on UrlGeneratorContext and UrlGeneratorOptions.

Inheritance
System.Object
UrlGeneratorContext
Namespace: EPiServer.Core.Routing.Pipeline
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
public class UrlGeneratorContext : Object

Constructors

UrlGeneratorContext(ContentReference)

Creates a new context instance

Declaration
public UrlGeneratorContext(ContentReference contentLink)
Parameters
Type Name Description
ContentReference contentLink

The contentlink for which an url is to be generated

Properties

A reference to the content item for which an url is generated

Declaration
public ContentReference ContentLink { get; set; }
Property Value
Type Description
ContentReference

ContextMode

The context mode the url should be generated in

Declaration
public ContextMode ContextMode { get; set; }
Property Value
Type Description
ContextMode

CurrentHost

The host that current request is served under or null if the host could not be resolved.

Declaration
public HostDefinition CurrentHost { get; set; }
Property Value
Type Description
HostDefinition

Host

The host that the content is served under or null if the host could not be resolved.

Declaration
public HostDefinition Host { get; set; }
Property Value
Type Description
HostDefinition

Language

The language version of the content that is linked

Declaration
public CultureInfo Language { get; set; }
Property Value
Type Description
System.Globalization.CultureInfo

RouteValues

Custom values that can be used to pass data between different steps in the pipeline.

Declaration
public IDictionary<string, object> RouteValues { get; }
Property Value
Type Description
System.Collections.Generic.IDictionary<System.String, System.Object>

Url

The Url that is being generated

Declaration
public UrlBuilder Url { get; set; }
Property Value
Type Description
UrlBuilder

Extension Methods