Table of Contents

Class CachedDataAnnotationsModelMetadataProvider

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

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

public class CachedDataAnnotationsModelMetadataProvider : CachedAssociatedMetadataProvider<CachedDataAnnotationsModelMetadata>
Inheritance
CachedDataAnnotationsModelMetadataProvider
Inherited Members

Constructors

CachedDataAnnotationsModelMetadataProvider()

Initializes a new instance of the CachedDataAnnotationsModelMetadataProvider class.

public CachedDataAnnotationsModelMetadataProvider()

Methods

CreateMetadataFromPrototype(CachedDataAnnotationsModelMetadata, Func<object>)

Returns a container of real instances of the cached metadata class based on prototype and model accessor.

protected override CachedDataAnnotationsModelMetadata CreateMetadataFromPrototype(CachedDataAnnotationsModelMetadata prototype, Func<object> modelAccessor)

Parameters

prototype CachedDataAnnotationsModelMetadata

The prototype.

modelAccessor Func<object>

The model accessor.

Returns

CachedDataAnnotationsModelMetadata

A container of real instances of the cached metadata class.

CreateMetadataPrototype(IEnumerable<Attribute>, Type, Type, string)

Returns a container prototype instances of the metadata class.

protected override CachedDataAnnotationsModelMetadata CreateMetadataPrototype(IEnumerable<Attribute> attributes, Type containerType, Type modelType, string propertyName)

Parameters

attributes IEnumerable<Attribute>

The attributes type.

containerType Type

The container type.

modelType Type

The model type.

propertyName string

The property name.

Returns

CachedDataAnnotationsModelMetadata

a container prototype instances of the metadata class.