Table of Contents

Class FilePathExistsAttributeBase

Namespace
McMaster.Extensions.CommandLineUtils.Validation
Assembly
McMaster.Extensions.CommandLineUtils.dll

Base type for attributes that check for existing files or directories.

[AttributeUsage(AttributeTargets.Property)]
public abstract class FilePathExistsAttributeBase : ValidationAttribute
Inheritance
object
Attribute
ValidationAttribute
FilePathExistsAttributeBase
Derived

Methods

IsValid(object?, ValidationContext)

Validates the specified value with respect to the current validation attribute.

protected override ValidationResult? IsValid(object? value, ValidationContext validationContext)

Parameters

value object

The value to validate.

validationContext ValidationContext

The context information about the validation operation.

Returns

ValidationResult

An instance of the ValidationResult class.

Exceptions

InvalidOperationException

The current attribute is malformed.

NotImplementedException

IsValid(object, ValidationContext) has not been implemented by a derived class.