Class LegalFilePathAttribute
Specifies that a value must be a legal file path.
Inheritance
System.Object
System.Attribute
System.ComponentModel.DataAnnotations.ValidationAttribute
LegalFilePathAttribute
Namespace: McMaster.Extensions.CommandLineUtils
Assembly: McMaster.Extensions.CommandLineUtils.dll
Syntax
[AttributeUsage(AttributeTargets.Property)]
public sealed class LegalFilePathAttribute : ValidationAttribute
Constructors
| Improve this Doc View SourceLegalFilePathAttribute()
Initializes an instance of LegalFilePathAttribute.
Declaration
public LegalFilePathAttribute()
Methods
| Improve this Doc View SourceIsValid(Object, ValidationContext)
Declaration
protected override ValidationResult IsValid(object value, ValidationContext validationContext)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | |
System.ComponentModel.DataAnnotations.ValidationContext | validationContext |
Returns
Type | Description |
---|---|
System.ComponentModel.DataAnnotations.ValidationResult |
Overrides
System.ComponentModel.DataAnnotations.ValidationAttribute.IsValid(System.Object, System.ComponentModel.DataAnnotations.ValidationContext)