Show / Hide Table of Contents

Class FileArgument

Inheritance
object
Argument<string>
StringArgument
FileArgument
Implements
IArgument
Inherited Members
StringArgument.TrySetValue(string)
Argument<string>.OnInitialize()
Argument<string>.Description
Argument<string>.FriendlyName
Argument<string>.Value
Argument<string>.HasValue
Argument<string>.Name
Argument<string>.Alias
Argument<string>.HasAlias
Argument<string>.IsPositionalSource
Argument<string>.IsRequired
Argument<string>.AllowEmptyValue
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Benday.CommandsFramework
Assembly: Benday.CommandsFramework.dll
Syntax
public class FileArgument : StringArgument, IArgument

Constructors

| Edit this page View Source

FileArgument(string)

Declaration
public FileArgument(string name)
Parameters
Type Name Description
string name

Properties

| Edit this page View Source

AbsolutePath

Declaration
public string AbsolutePath { get; }
Property Value
Type Description
string
| Edit this page View Source

DataType

Data type for the argument

Declaration
public override ArgumentDataType DataType { get; }
Property Value
Type Description
ArgumentDataType
Overrides
StringArgument.DataType
| Edit this page View Source

MustExist

If true, then the directory must exist in order to be considered valid

Declaration
public bool MustExist { get; set; }
Property Value
Type Description
bool

Methods

| Edit this page View Source

GetDefaultValue()

Get the default value for the argument

Declaration
protected override string GetDefaultValue()
Returns
Type Description
string

Empty string

Overrides
StringArgument.GetDefaultValue()
| Edit this page View Source

Validate()

Validate the argument value against the argument definition

Declaration
public override bool Validate()
Returns
Type Description
bool

True if the argument is valid

Overrides
StringArgument.Validate()

Implements

IArgument

Extension Methods

ExtensionMethods.AllowEmptyValue<T>(Argument<T>, bool)
ExtensionMethods.AsNotRequired<T>(Argument<T>)
ExtensionMethods.AsRequired<T>(Argument<T>)
ExtensionMethods.ExistenceOptional<T>(Argument<T>)
ExtensionMethods.FromPositionalArgument<T>(Argument<T>, int)
ExtensionMethods.MustExist<T>(Argument<T>)
ExtensionMethods.WithAlias<T>(Argument<T>, string)
ExtensionMethods.WithDefaultValue<T>(Argument<T>, T)
ExtensionMethods.WithDescription<T>(Argument<T>, string)
ExtensionMethods.WithFriendlyName<T>(Argument<T>, string)
  • Edit this page
  • View Source
In this article
Back to top Copyright © www.benday.com | info@benday.com