Class PathValidator
Defines an abstract base class for validator classes validating directory or file paths.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Juhta.Net.Validation
Assembly: Juhta.Net.Validation.dll
Syntax
public abstract class PathValidator
Constructors
| Improve this Doc View SourcePathValidator(ErrorMessage)
Initializes a new instance.
Declaration
protected PathValidator(ErrorMessage errorMessage)
Parameters
Type | Name | Description |
---|---|---|
ErrorMessage | errorMessage | Specifies an error message to associate with the instance. |
Fields
| Improve this Doc View Sourcem_errorMessage
Specifies the error message associated with this validator instance.
Declaration
protected readonly ErrorMessage m_errorMessage
Field Value
Type | Description |
---|---|
ErrorMessage |
Methods
| Improve this Doc View SourceIsValidDirectoryName(String)
Checks whether a specified value is a valid directory name.
Declaration
protected bool IsValidDirectoryName(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | Specifies a value to be checked. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the specified value is a valid directory name, otherwise false. |
IsValidFileName(String)
Checks whether a specified value is a valid file name.
Declaration
protected bool IsValidFileName(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | Specifies a value to be checked. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the specified value is a valid file name, otherwise false. |
IsValidPath(String, PathValidator.PathType)
Checks whether a specified value is a valid path.
Declaration
protected bool IsValidPath(string value, PathValidator.PathType pathType)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | Specifies a value to be checked. |
PathValidator.PathType | pathType | Specifies a path type. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the specified value is a valid path, otherwise false. |