FileExtensionsAttribute Class

 

Represents the attribute of file extensions.

Namespace:   Microsoft.Web.Mvc
Assembly:  Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)

Inheritance Hierarchy

System.Object
  System.Attribute
    System.ComponentModel.DataAnnotations.ValidationAttribute
      System.ComponentModel.DataAnnotations.DataTypeAttribute
        Microsoft.Web.Mvc.FileExtensionsAttribute

Syntax

[AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple = false)]
public sealed class FileExtensionsAttribute : DataTypeAttribute, 
    IClientValidatable
[AttributeUsageAttribute(AttributeTargets::Property, AllowMultiple = false)]
public ref class FileExtensionsAttribute sealed : DataTypeAttribute, 
    IClientValidatable
[<Sealed>]
[<AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple = false)>]
type FileExtensionsAttribute = 
    class
        inherit DataTypeAttribute
        interface IClientValidatable
    end
<AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple := False)>
Public NotInheritable Class FileExtensionsAttribute
    Inherits DataTypeAttribute
    Implements IClientValidatable

Constructors

Name Description
System_CAPS_pubmethod FileExtensionsAttribute()

Initializes a new instance of the FileExtensionsAttribute class.

Properties

Name Description
System_CAPS_pubproperty CustomDataType

(Inherited from DataTypeAttribute.)

System_CAPS_pubproperty DataType

(Inherited from DataTypeAttribute.)

System_CAPS_pubproperty DisplayFormat

(Inherited from DataTypeAttribute.)

System_CAPS_pubproperty ErrorMessage

(Inherited from ValidationAttribute.)

System_CAPS_pubproperty ErrorMessageResourceName

(Inherited from ValidationAttribute.)

System_CAPS_pubproperty ErrorMessageResourceType

(Inherited from ValidationAttribute.)

System_CAPS_pubproperty Extensions

Gets or sets the file extensions.

System_CAPS_pubproperty RequiresValidationContext

(Inherited from ValidationAttribute.)

System_CAPS_pubproperty TypeId

(Inherited from Attribute.)

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Attribute.)

System_CAPS_pubmethod FormatErrorMessage(String)

Formats the error message to display if the file extensions validation fails.(Overrides ValidationAttribute.FormatErrorMessage(String).)

System_CAPS_pubmethod GetClientValidationRules(ModelMetadata, ControllerContext)

Checks the client validation rules.

System_CAPS_pubmethod GetDataTypeName()

(Inherited from DataTypeAttribute.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Attribute.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod GetValidationResult(Object, ValidationContext)

(Inherited from ValidationAttribute.)

System_CAPS_pubmethod IsDefaultAttribute()

(Inherited from Attribute.)

System_CAPS_pubmethod IsValid(Object)

Determines whether the specified value of the object is valid.(Overrides DataTypeAttribute.IsValid(Object).)

System_CAPS_pubmethod Match(Object)

(Inherited from Attribute.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod Validate(Object, String)

(Inherited from ValidationAttribute.)

System_CAPS_pubmethod Validate(Object, ValidationContext)

(Inherited from ValidationAttribute.)

Explicit Interface Implementations

Name Description
System_CAPS_pubinterfaceSystem_CAPS_privmethod _Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

(Inherited from Attribute.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod _Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

(Inherited from Attribute.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod _Attribute.GetTypeInfoCount(UInt32)

(Inherited from Attribute.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod _Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

(Inherited from Attribute.)

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.Web.Mvc Namespace

Return to top