Try our conversational search powered by Generative AI!

Class RequestSegmentContext

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Encapsulates information about a HTTP request that is used when determining segments during routing.

Inheritance
System.Object
RequestSegmentContext
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Web.Routing.Segments.Internal
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
public class RequestSegmentContext : SegmentContext

Constructors

RequestSegmentContext(HttpContextBase, RouteData)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the SegmentContext class.

Declaration
public RequestSegmentContext(HttpContextBase httpContextBase, RouteData routeData)
Parameters
Type Name Description
System.Web.HttpContextBase httpContextBase

An object that contains information about the HTTP request.

System.Web.Routing.RouteData routeData

An object that contains information about the route that matched the current.

Exceptions
Type Condition
System.ArgumentNullException

httpContext or routeData is null.

RequestSegmentContext(HttpContextBase, RouteData, IUpdateCurrentLanguage)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the SegmentContext class.

Declaration
public RequestSegmentContext(HttpContextBase httpContextBase, RouteData routeData, IUpdateCurrentLanguage updateCurrentLanguage)
Parameters
Type Name Description
System.Web.HttpContextBase httpContextBase

An object that contains information about the HTTP request.

System.Web.Routing.RouteData routeData

An object that contains information about the route that matched the current.

IUpdateCurrentLanguage updateCurrentLanguage

The update current language.

Exceptions
Type Condition
System.ArgumentNullException

httpContext or routeData is null.

Fields

CmsPathGetter

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. The function that returns the path to the cms editorial interface.

Declaration
public static Func<string> CmsPathGetter
Field Value
Type Description
System.Func<System.String>

CurrentContextModeGetter

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Replace this function to return a specific context mode in tests.

Declaration
public static Func<ContextMode> CurrentContextModeGetter
Field Value
Type Description
System.Func<ContextMode>

EpiEditMode

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Name on the query parameter indicating if the request is in edit mode.

Declaration
public const string EpiEditMode = "epieditmode"
Field Value
Type Description
System.String

Properties

ContextMode

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets or sets the context mode for the route.

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

The context mode.

Overrides

CurrentContextMode

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the context mode for the current request.

Declaration
public static ContextMode CurrentContextMode { get; }
Property Value
Type Description
ContextMode

The context mode as defined in ContextMode.

Language

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. This property states the language for the request.

Declaration
public override string Language { get; set; }
Property Value
Type Description
System.String
Overrides

QueryString

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the query string for the route.

Declaration
public override NameValueCollection QueryString { get; }
Property Value
Type Description
System.Collections.Specialized.NameValueCollection

The query string.

Overrides

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. This property states the ContentReference for the route.

Declaration
public override ContentReference RoutedContentLink { get; set; }
Property Value
Type Description
ContentReference
Overrides

RoutedObject

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets or sets the route data.

Declaration
public override object RoutedObject { get; set; }
Property Value
Type Description
System.Object

The route data.

Overrides

RoutedSiteDefinition

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets or sets the site definition that matches the route.

Declaration
public override SiteDefinition RoutedSiteDefinition { get; set; }
Property Value
Type Description
SiteDefinition

The routed site definition.

Overrides
Remarks

Will update Current

Methods

Copy()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Copies this instance.

Declaration
public override SegmentContext Copy()
Returns
Type Description
SegmentContext
Overrides

GetCustomRouteData<T>(String)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets custom route data from context.

Declaration
public override T GetCustomRouteData<T>(string code)
Parameters
Type Name Description
System.String code

The code.

Returns
Type Description
T
Type Parameters
Name Description
T
Overrides

PermanentRedirect(String)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Does a permanent redirect.

Declaration
public override void PermanentRedirect(string url)
Parameters
Type Name Description
System.String url

The URL.

Overrides

SetCustomRouteData<T>(String, T)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Sets custom route data in context.

Declaration
public override void SetCustomRouteData<T>(string code, T value)
Parameters
Type Name Description
System.String code

The code.

T value

The value.

Type Parameters
Name Description
T
Overrides
EPiServer.Web.Routing.Segments.SegmentContext.SetCustomRouteData<T>(System.String, T)

TemporaryRedirect(String)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Does a temporary redirect.

Declaration
public override void TemporaryRedirect(string url)
Parameters
Type Name Description
System.String url

The URL.

Overrides

Extension Methods