Class SimpleAddressRouteValues
Object containing information from a simple address route handler
Inheritance
Inherited Members
Namespace: EPiServer.Web.Routing.Segments
Assembly: EPiServer.dll
Version: 9.12.2Syntax
public class SimpleAddressRouteValues
Constructors
SimpleAddressRouteValues()
Initializes a new instance of the SimpleAddressRouteValues class.
Declaration
protected SimpleAddressRouteValues()
SimpleAddressRouteValues(ContentReference, ContentReference, String, String, Object)
Initializes a new instance of the SimpleAddressRouteValues class.
Declaration
public SimpleAddressRouteValues(ContentReference routedContentLink, ContentReference originalRoutedLink, string language, string contentLanguage, object routedObject)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | routedContentLink | The routed content link. |
ContentReference | originalRoutedLink | The original routed content link |
System.String | language | The language. |
System.String | contentLanguage | The content language. |
System.Object | routedObject | The routed object. |
SimpleAddressRouteValues(ContentReference, String)
Initializes a new instance of the SimpleAddressRouteValues class.
Declaration
public SimpleAddressRouteValues(ContentReference routedContentLink, string language)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | routedContentLink | The routed content link. |
System.String | language | The content language. |
Remarks
Sets contentLanguage equal to language.
SimpleAddressRouteValues(ContentReference, String, String, Object)
Initializes a new instance of the SimpleAddressRouteValues class.
Declaration
[Obsolete("Use alternative constructor")]
public SimpleAddressRouteValues(ContentReference routedContentLink, string language, string contentLanguage, object routedObject)
Parameters
Type | Name | Description |
---|---|---|
ContentReference | routedContentLink | The routed content link. |
System.String | language | The language. |
System.String | contentLanguage | The content language. |
System.Object | routedObject | The routed object. |
Properties
ContentLanguage
Gets or sets the language for the content that was routed to.
Declaration
public virtual string ContentLanguage { get; protected set; }
Property Value
Type | Description |
---|---|
System.String | The content langauge. |
Remarks
Note that ContentLanguage and Language might theoretically differ in routes but in the case of simple address they should be the same if the simple address is unique per language, in which case the content is found by the simple address segment and Language (the language in the routing context) would be determined by the ContentLanguage (the language of the routed content).
CustomRouteData
Custom route data which will be merged into the route context.
Declaration
public virtual Dictionary<string, object> CustomRouteData { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> |
Language
The language for the route.
Declaration
public virtual string Language { get; protected set; }
Property Value
Type | Description |
---|---|
System.String |
OriginalRoutedLink
The content link for routed content.
Declaration
public virtual ContentReference OriginalRoutedLink { get; protected set; }
Property Value
Type | Description |
---|---|
ContentReference |
RoutedContentLink
The content link for routed content.
Declaration
public virtual ContentReference RoutedContentLink { get; protected set; }
Property Value
Type | Description |
---|---|
ContentReference |
RoutedObject
The routed object.
Declaration
public virtual object RoutedObject { get; protected set; }
Property Value
Type | Description |
---|---|
System.Object |
Methods
ApplyTo(SegmentContext, Boolean)
Applies the stored values to the context. The values in the CustomRouteData dictionary are merged with the custom values in the SegmentContext, overwriting any values that exist in both objects.
Declaration
public virtual void ApplyTo(SegmentContext context, bool setRoutedContentLink)
Parameters
Type | Name | Description |
---|---|---|
SegmentContext | context | The segment context. |
System.Boolean | setRoutedContentLink | Wheter to set the RoutedContentLink property. |
GetCustomRouteData<T>(String)
Gets custom route data.
Declaration
public virtual T GetCustomRouteData<T>(string code)
Parameters
Type | Name | Description |
---|---|---|
System.String | code | The code. |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
SetCustomRouteData<T>(String, T)
Sets custom route data.
Declaration
public virtual 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 |