November Happy Hour will be moved to Thursday December 5th.

Class UrlSegmentOptions

Contains options used to specify how url segments should be created. It is used by IUrlSegmentCreator and IUrlSegmentGenerator

Inheritance
System.Object
UrlSegmentOptions
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
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
[Options]
public class UrlSegmentOptions

Constructors

UrlSegmentOptions()

Creates a new instance of UrlSegmentOptions

Declaration
public UrlSegmentOptions()

Properties

CharacterMap

Specifies a mapping table for characters not allowed due to ValidCharacters.

Declaration
public IDictionary<char, char> CharacterMap { get; }
Property Value
Type Description
System.Collections.Generic.IDictionary<System.Char, System.Char>
Remarks

Characters that are not allowed due to ValidCharacters and do not have a mapped replacement in CharacterMap will be removed from segment.

Encode

Declaration
[Obsolete("Use SupportIriCharacters instead")]
public bool Encode { get; set; }
Property Value
Type Description
System.Boolean

ReservedSegments

Defines segments that are reserved by e.g. IIS

Declaration
public IList<string> ReservedSegments { get; }
Property Value
Type Description
System.Collections.Generic.IList<System.String>
Remarks

Default values are "bin", "app_code", "app_globalresources", "app_localresources", "app_webreferences", "app_data", "app_browsers"

SupportIriCharacters

Indicates if segments supports IRI characters. If ValidCharacters are set to allow characters that are not allowed in url segments according to url specification this should be set to true.

Declaration
public bool SupportIriCharacters { get; set; }
Property Value
Type Description
System.Boolean
Remarks

Purpose of this is to indicate to for example rendering components that the segment might need to be encoded.

UseLowercase

Indicates if only lowercase characters should be used in url segments

Declaration
public bool UseLowercase { get; set; }
Property Value
Type Description
System.Boolean
Remarks

Default value is true

ValidCharacters

Gets or sets the characters that are valid to use as url segment, will be used as argument to Regexp

Declaration
public string ValidCharacters { get; set; }
Property Value
Type Description
System.String
Remarks

Default value is 'A-Za-z0-9-_~.$'

ValidUrlCharacters

Declaration
[Obsolete("Use ValidCharacters instead")]
public string ValidUrlCharacters { get; set; }
Property Value
Type Description
System.String

Extension Methods