Interface IUrlSegmentGenerator
Component that generates url segments for strings
Namespace: EPiServer.Web
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public interface IUrlSegmentGenerator
Methods
Create(String, UrlSegmentOptions)
Creates a url friendly segment from the passed in string
Declaration
string Create(string proposedSegment, UrlSegmentOptions options)
Parameters
Type | Name | Description |
---|---|---|
System. |
proposedSegment | The segment to generate a url friendly segment for |
Url |
options | The options used to generate the url segment |
Returns
Type | Description |
---|---|
System. |
A url friendly segment |
Remarks
Validoptions
is null is options retrieved from IOC container.
IsValid(String, UrlSegmentOptions)
Determines if an url segment is considered url friendly
Declaration
bool IsValid(string segment, UrlSegmentOptions options)
Parameters
Type | Name | Description |
---|---|---|
System. |
segment | The segment to validate |
Url |
options | The options used to validate the url segment |
Returns
Type | Description |
---|---|
System. |
true if segment is considered valid else false |
Remarks
Validoptions
is null is options retrieved from IOC container.