Show / Hide Table of Contents

Class PathValidator

Defines an abstract base class for validator classes validating directory or file paths.

Inheritance
System.Object
PathValidator
DirectoryPathValidator
FilePathValidator
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 Source

PathValidator(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 Source

m_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 Source

IsValidDirectoryName(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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

  • Improve this Doc
  • View Source
Back to top Copyright © 2017-2019 Juha Lähteenmäki
Generated by DocFX