Class SimpleAddressValidator
Validates that a simple address for a page is unique within its siblings.
Inheritance
System.Object
SimpleAddressValidator
Namespace: EPiServer.Validation.Internal
Assembly: EPiServer.dll
Version: 12.0.3Syntax
[ServiceConfiguration]
public class SimpleAddressValidator : Object, IValidate<PageData>, IValidate
Constructors
SimpleAddressValidator(IContentRepository, LocalizationService, IUrlSegmentLocator, ISiteDefinitionResolver, IUrlSegmentGenerator)
Declaration
public SimpleAddressValidator(IContentRepository contentRepository, LocalizationService localizationService, IUrlSegmentLocator urlSegmentLocator, ISiteDefinitionResolver siteDefinitionResolver, IUrlSegmentGenerator urlSegmentGenerator)
Parameters
Type | Name | Description |
---|---|---|
IContentRepository | contentRepository | |
LocalizationService | localizationService | |
IUrlSegmentLocator | urlSegmentLocator | |
ISiteDefinitionResolver | siteDefinitionResolver | |
IUrlSegmentGenerator | urlSegmentGenerator |
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 WebRootPath, the reason the dicitonary is exposed to make it possible to replace during tests.
VirtualPathMappings
Declaration
public IDictionary<string, string> VirtualPathMappings { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.String> |
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> |