-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Jared A Barneck edited this page May 29, 2015
·
4 revisions
This page will hold examples for you to use.
- This parameter accepts a file name/path.
- The example usage would be SourceFile="filename.txt" or f="Filename.txt".
- It is required.
- It has a CustomValidation to make sure the file exists.
- If SourceFile= or f= are not provided, then it must be the first arg (SequenceId = 1). Sequence is only enforced if named parameters are not used. (This might not be enforced in code yet and might still be a todo item)
new Argument
{
Name = "SourceFile",
ShortName = "f",
Description = "The file to search in. Must be first.",
Example = @"myfile.txt",
SequenceId = 1,
IsRequired = true,
CustomValidation = (value) => File.Exists(value)
}
And you can get the value as follows:
Args.Value("SourceFile")
or with the shortname
Args.Value("f")