CliValidationRules Enumeration

Defines validation rules for a CLI argument and a CLI option's argument.

Definition

Namespace: DotMake.CommandLine
Assembly: DotMake.CommandLine (in DotMake.CommandLine.dll) Version: 1.8.8
C#
[FlagsAttribute]
public enum CliValidationRules

Members

None0None of the validation rules.
ExistingFile1Specifies that argument value(s) must be a path to a file that already exists.
NonExistingFile2Specifies that argument value(s) must be a path to a file that does not already exist.
ExistingDirectory4Specifies that argument value(s) must be a path to a directory that already exists.
NonExistingDirectory8Specifies that argument value(s) must be a path to a directory that does not already exist.
ExistingFileOrDirectory16Specifies that argument value(s) must be a path to a file or a directory that already exists.
NonExistingFileOrDirectory32Specifies that argument value(s) must be a path to a file or a directory that does not already exist.
LegalPath64Specifies that argument value(s) must be a legal file or directory path (i.e. must not have invalid path characters).
LegalFileName128Specifies that argument value(s) must be a legal file name (i.e. must not have invalid file name characters e.g. path separators).
LegalUri256 Specifies that argument value(s) must be a legal URI.

Valid examples:

C#
http://www.google.com
ftp://ftp.is.co.za/rfc/rfc1808.txt 
file:///c:/directory/filename

LegalUrl512 Specifies that argument value(s) must be a legal URL.

Valid examples:

C#
https://www.google.com
http://www.google.com
www.google.com
google.com

See Also