Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
DataAnnotationsModelMetadataProvider Class
Collapse the table of content
Expand the table of content

DataAnnotationsModelMetadataProvider Class

 

Implements the default model metadata provider for ASP.NET MVC.

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

System.Object
  System.Web.Mvc.ModelMetadataProvider
    System.Web.Mvc.AssociatedMetadataProvider
      System.Web.Mvc.DataAnnotationsModelMetadataProvider

public class DataAnnotationsModelMetadataProvider : AssociatedMetadataProvider

NameDescription
System_CAPS_pubmethodDataAnnotationsModelMetadataProvider()

Initializes a new instance of the DataAnnotationsModelMetadataProvider class.

NameDescription
System_CAPS_protmethodCreateMetadata(IEnumerable<Attribute>, Type, Func<Object>, Type, String)
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFilterAttributes(Type, PropertyDescriptor, IEnumerable<Attribute>)

Gets a list of attributes.(Inherited from AssociatedMetadataProvider.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetMetadataForProperties(Object, Type)

Returns a list of properties for the model.(Inherited from AssociatedMetadataProvider.)

System_CAPS_protmethodGetMetadataForProperty(Func<Object>, Type, PropertyDescriptor)

Returns the metadata for the specified property using the container type and property descriptor.(Inherited from AssociatedMetadataProvider.)

System_CAPS_pubmethodGetMetadataForProperty(Func<Object>, Type, String)

Returns the metadata for the specified property using the container type and property name.(Inherited from AssociatedMetadataProvider.)

System_CAPS_pubmethodGetMetadataForType(Func<Object>, Type)

Returns the metadata for the specified property using the type of the model.(Inherited from AssociatedMetadataProvider.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodGetTypeDescriptor(Type)

Returns the type descriptor from the specified type.(Inherited from AssociatedMetadataProvider.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

The ModelMetadataProviders class sets this class as the default metadata provider for the MVC framework. You typically do not have to use this class directly. If you develop a custom attribute-based metadata provider, you can use this implementation as a guide.

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

Return to top
Show:
© 2015 Microsoft