DataAnnotationsModelMetadataProvider Class

Implements the default model metadata provider.

Inheritance Hierarchy

System.Object
  System.Web.Http.Metadata.ModelMetadataProvider
    System.Web.Http.Metadata.Providers.AssociatedMetadataProvider<CachedDataAnnotationsModelMetadata>
      System.Web.Http.Metadata.Providers.DataAnnotationsModelMetadataProvider

Namespace:  System.Web.Http.Metadata.Providers
Assembly:  System.Web.Http (in System.Web.Http.dll)

Syntax

'Declaration
Public Class DataAnnotationsModelMetadataProvider _
    Inherits AssociatedMetadataProvider(Of CachedDataAnnotationsModelMetadata)
'Usage
Dim instance As DataAnnotationsModelMetadataProvider
public class DataAnnotationsModelMetadataProvider : AssociatedMetadataProvider<CachedDataAnnotationsModelMetadata>
public ref class DataAnnotationsModelMetadataProvider : public AssociatedMetadataProvider<CachedDataAnnotationsModelMetadata^>
type DataAnnotationsModelMetadataProvider =  
    class 
        inherit AssociatedMetadataProvider<CachedDataAnnotationsModelMetadata>
    end
public class DataAnnotationsModelMetadataProvider extends AssociatedMetadataProvider<CachedDataAnnotationsModelMetadata>

The DataAnnotationsModelMetadataProvider type exposes the following members.

Constructors

  Name Description
Public method DataAnnotationsModelMetadataProvider Initializes a new instance of the DataAnnotationsModelMetadataProvider class.

Top

Methods

  Name Description
Protected method CreateMetadataFromPrototype Creates the metadata from prototype for the specified property. (Overrides AssociatedMetadataProvider<TModelMetadata>.CreateMetadataFromPrototype(TModelMetadata, Func<Object>).)
Protected method CreateMetadataPrototype Creates the metadata for the specified property. (Overrides AssociatedMetadataProvider<TModelMetadata>.CreateMetadataPrototype(IEnumerable<Attribute>, Type, Type, String).)
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetMetadataForProperties Retrieves a list of properties for the model. (Inherited from AssociatedMetadataProvider<TModelMetadata>.)
Public method GetMetadataForProperty Retrieves the metadata for the specified property using the container type and property name. (Inherited from AssociatedMetadataProvider<TModelMetadata>.)
Public method GetMetadataForType Returns the metadata for the specified property using the type of the model. (Inherited from AssociatedMetadataProvider<TModelMetadata>.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)

Top

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

Reference

System.Web.Http.Metadata.Providers Namespace