Class GuidSegment
Implements
Inherited Members
Namespace: EPiServer.Web.Routing.Segments
Assembly: EPiServer.dll
Version: 7.19.2Syntax
public class GuidSegment : NodeSegment, ISegment
Constructors
GuidSegment(String, String, IUrlSegmentRouter, IPermanentLinkMapper, RouteCollection, IContentLoader, UrlResolver)
Initializes a new instance of the Node segment class.
Declaration
public GuidSegment(string name, string friendlyUrlExtension, IUrlSegmentRouter urlSegmentRouter, IPermanentLinkMapper permanentLinkMapper, RouteCollection routeCollection, IContentLoader contentLoader, UrlResolver urlResolver)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the segment. |
System.String | friendlyUrlExtension | he extension used for friendly URL generation. |
IUrlSegmentRouter | urlSegmentRouter | The router used when resolving nodes. |
IPermanentLinkMapper | permanentLinkMapper | The permanent link mapper. |
System.Web.Routing.RouteCollection | routeCollection | The route collection. |
IContentLoader | contentLoader | The content loader. |
UrlResolver | urlResolver | The URL resolver. |
GuidSegment(String, String, IUrlSegmentRouter, ILanguageSegmentMatcher, IPermanentLinkMapper, RouteCollection, IContentLoader, IUpdateCurrentLanguage, UrlResolver)
Initializes a new instance of the Node segment class.
Declaration
[Obsolete("Use overload without IUpdateCurrentLanguage parameter")]
public GuidSegment(string name, string friendlyUrlExtension, IUrlSegmentRouter urlSegmentRouter, ILanguageSegmentMatcher languageSegment, IPermanentLinkMapper permanentLinkMapper, RouteCollection routeCollection, IContentLoader contentLoader, IUpdateCurrentLanguage updateCurrentLanguage, UrlResolver urlResolver)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the segment. |
System.String | friendlyUrlExtension | he extension used for friendly URL generation. |
IUrlSegmentRouter | urlSegmentRouter | The router used when resolving nodes. |
ILanguageSegmentMatcher | languageSegment | The langue segment used. |
IPermanentLinkMapper | permanentLinkMapper | The permanent link mapper. |
System.Web.Routing.RouteCollection | routeCollection | The route collection. |
IContentLoader | contentLoader | The content loader. |
IUpdateCurrentLanguage | updateCurrentLanguage | A handler to update the current language setting. |
UrlResolver | urlResolver | The URL resolver. |
Properties
PreferredLanguageAccessor
Exposes the accessor used to get PreferredLanguage.
Declaration
public Func<string> PreferredLanguageAccessor { get; set; }
Property Value
Type | Description |
---|---|
System.Func<System.String> | The preferred language accessor. |
Remarks
This is primarly exposed to make it possible to change in unit tests. By default the value is set PreferredCulture.
Methods
RouteDataMatch(SegmentContext)
Set the node, language and controller value to the segment context.
Declaration
public override bool RouteDataMatch(SegmentContext context)
Parameters
Type | Name | Description |
---|---|---|
SegmentContext | context | The segment context |
Returns
Type | Description |
---|---|
System.Boolean | It will always return true. |
Overrides
TryParse(String, out Guid)
Tries to parse the string to a guid by using Guid.TryParseExact(guidString, "N", out permanentGuid)
Declaration
protected virtual bool TryParse(string guidString, out Guid permanentGuid)
Parameters
Type | Name | Description |
---|---|---|
System.String | guidString | The GUID string. |
System.Guid | permanentGuid | The permanent GUID. |
Returns
Type | Description |
---|---|
System.Boolean |
|