C# Class DataAnnotationsExtensions.FileExtensionsAttribute

Inheritance: System.ComponentModel.DataAnnotations.DataTypeAttribute
Afficher le fichier Open project: srkirkland/DataAnnotationsExtensions

Méthodes publiques

Méthode Description
FileExtensionsAttribute ( string allowedExtensions = "png,jpg,jpeg,gif" ) : System

Provide the allowed file extensions, seperated via comma or pipe, defaults to "png,jpeg,jpg,gif"

FormatErrorMessage ( string name ) : string
IsValid ( object value ) : bool

Private Methods

Méthode Description
ValidateExtension ( string fileName ) : bool

Method Details

FileExtensionsAttribute() public méthode

Provide the allowed file extensions, seperated via comma or pipe, defaults to "png,jpeg,jpg,gif"
public FileExtensionsAttribute ( string allowedExtensions = "png,jpg,jpeg,gif" ) : System
allowedExtensions string
Résultat System

FormatErrorMessage() public méthode

public FormatErrorMessage ( string name ) : string
name string
Résultat string

IsValid() public méthode

public IsValid ( object value ) : bool
value object
Résultat bool