CachedDataAnnotationsModelMetadataProvider Class

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

Inheritance Hierarchy

System.Object
  System.Web.Mvc.ModelMetadataProvider
    System.Web.Mvc.AssociatedMetadataProvider
      System.Web.Mvc.CachedAssociatedMetadataProvider<CachedDataAnnotationsModelMetadata>
        System.Web.Mvc.CachedDataAnnotationsModelMetadataProvider

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

Syntax

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

The CachedDataAnnotationsModelMetadataProvider type exposes the following members.

Constructors

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

Top

Properties

  Name Description
Protected property CacheItemPolicy Gets the cache item policy. (Inherited from CachedAssociatedMetadataProvider<TModelMetadata>.)
Protected property CacheKeyPrefix Gets the cache key prefix. (Inherited from CachedAssociatedMetadataProvider<TModelMetadata>.)
Protected property PrototypeCache Gets the prototype cache. (Inherited from CachedAssociatedMetadataProvider<TModelMetadata>.)

Top

Methods

  Name Description
Protected method CreateMetadata When overridden in a derived class, creates the cached model metadata for the property. (Inherited from CachedAssociatedMetadataProvider<TModelMetadata>.)
Protected method CreateMetadataFromPrototype Returns a container of real instances of the cached metadata class based on prototype and model accessor. (Overrides CachedAssociatedMetadataProvider<TModelMetadata>.CreateMetadataFromPrototype(TModelMetadata, Func<Object>).)
Protected method CreateMetadataPrototype Returns a container prototype instances of the metadata class. (Overrides CachedAssociatedMetadataProvider<TModelMetadata>.CreateMetadataPrototype(IEnumerable<Attribute>, Type, Type, String).)
Public method Equals (Inherited from Object.)
Protected method FilterAttributes Gets a list of attributes. (Inherited from AssociatedMetadataProvider.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetMetadataForProperties Gets the metadata for the properties. (Inherited from CachedAssociatedMetadataProvider<TModelMetadata>.)
Protected method GetMetadataForProperty(Func<Object>, Type, PropertyDescriptor) Returns the metadata for the specified property. (Inherited from CachedAssociatedMetadataProvider<TModelMetadata>.)
Public method GetMetadataForProperty(Func<Object>, Type, String) Returns the metadata for the specified property. (Inherited from CachedAssociatedMetadataProvider<TModelMetadata>.)
Public method GetMetadataForType Returns the cached metadata for the specified property using the type of the model. (Inherited from CachedAssociatedMetadataProvider<TModelMetadata>.)
Public method GetType (Inherited from Object.)
Protected method GetTypeDescriptor Returns the type descriptor from the specified type. (Inherited from AssociatedMetadataProvider.)
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.Mvc Namespace