CachedAssociatedMetadataProvider<TModelMetadata> Class

Provides an abstract class to implement a cached metadata provider.

Inheritance Hierarchy

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

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

Syntax

'Declaration
Public MustInherit Class CachedAssociatedMetadataProvider(Of TModelMetadata As ModelMetadata) _
    Inherits AssociatedMetadataProvider
'Usage
Dim instance As CachedAssociatedMetadataProvider(Of TModelMetadata)
public abstract class CachedAssociatedMetadataProvider<TModelMetadata> : AssociatedMetadataProvider 
where TModelMetadata : ModelMetadata
generic<typename TModelMetadata>
where TModelMetadata : ModelMetadata 
public ref class CachedAssociatedMetadataProvider abstract : public AssociatedMetadataProvider
[<AbstractClassAttribute>]
type CachedAssociatedMetadataProvider<'TModelMetadata when 'TModelMetadata : ModelMetadata> =  
    class 
        inherit AssociatedMetadataProvider 
    end
JScript does not support generic types and methods.

Type Parameters

  • TModelMetadata

The CachedAssociatedMetadataProvider<TModelMetadata> type exposes the following members.

Constructors

  Name Description
Protected method CachedAssociatedMetadataProvider<TModelMetadata> Initializes a new instance of the CachedAssociatedMetadataProvider<TModelMetadata> class.

Top

Properties

  Name Description
Protected property CacheItemPolicy Gets the cache item policy.
Protected property CacheKeyPrefix Gets the cache key prefix.
Protected property PrototypeCache Gets the prototype cache.

Top

Methods

  Name Description
Protected method CreateMetadata When overridden in a derived class, creates the cached model metadata for the property. (Overrides AssociatedMetadataProvider.CreateMetadata(IEnumerable<Attribute>, Type, Func<Object>, Type, String).)
Protected method CreateMetadataFromPrototype Creates prototype metadata by applying the prototype and model access to yield the final metadata.
Protected method CreateMetadataPrototype Creates a metadata prototype.
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. (Overrides AssociatedMetadataProvider.GetMetadataForProperties(Object, Type).)
Protected method GetMetadataForProperty(Func<Object>, Type, PropertyDescriptor) Returns the metadata for the specified property. (Overrides AssociatedMetadataProvider.GetMetadataForProperty(Func<Object>, Type, PropertyDescriptor).)
Public method GetMetadataForProperty(Func<Object>, Type, String) Returns the metadata for the specified property. (Overrides AssociatedMetadataProvider.GetMetadataForProperty(Func<Object>, Type, String).)
Public method GetMetadataForType Returns the cached metadata for the specified property using the type of the model. (Overrides AssociatedMetadataProvider.GetMetadataForType(Func<Object>, Type).)
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