Class SimpleAddressValidator
Validates that a simple address for a page is unique within its sieblings.
Inheritance
Inherited Members
Namespace: EPiServer.Validation
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public class SimpleAddressValidator : IValidate<PageData>, IValidate
Constructors
SimpleAddressValidator(IContentRepository, LocalizationService, UrlSegment, SiteDefinitionResolver)
Initializes a new instance of the SimpleAddressValidator class.
Declaration
public SimpleAddressValidator(IContentRepository contentRepository, LocalizationService localizationService, UrlSegment urlSegment, SiteDefinitionResolver siteDefinitionResolver)
Parameters
Type | Name | Description |
---|---|---|
IContentRepository | contentRepository | The content repository. |
LocalizationService | localizationService | The localization service. |
UrlSegment | urlSegment | The URL segment. |
SiteDefinitionResolver | siteDefinitionResolver | The SiteDefinition Resolver |
Properties
BaseDirectory
Gets or sets the base directory.
Declaration
public string BaseDirectory { get; set; }
Property Value
Type | Description |
---|---|
System.String | The base directory. |
Remarks
The implemenation uses BaseDirectory, the reason the dicitonary is exposed to make it possible to replace during tests.
HostLanguageMappings
The HostLangaugeMappings that is used.
Declaration
public StringDictionary HostLanguageMappings { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Specialized.StringDictionary | The host language mappings. |
Remarks
The implemenation uses HostLanguageMappings, the reason the dicitonary is exposed to make it possible to replace during tests.
VirtualPathMappings
The VirtualPathMappings that is used.
Declaration
public IDictionary<string, string> VirtualPathMappings { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.String> | The virtual path mappings. |
Remarks
The implemenation uses EPiServer.Web.Hosting.VirtualPathHandler.Instance.NameToVirtualPathMapping, the reason the dicitonary is exposed to make it possible to replace during tests.
Methods
Validate(PageData)
Validates the specified instance.
Declaration
public IEnumerable<ValidationError> Validate(PageData page)
Parameters
Type | Name | Description |
---|---|---|
PageData | page | The instance. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ValidationError> |