Class CachedDataAnnotationsModelMetadataProvider
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
CachedDataAnnotationsModelMetadataThe 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
TypeThe container type.
modelType
TypeThe model type.
propertyName
stringThe property name.
Returns
- CachedDataAnnotationsModelMetadata
a container prototype instances of the metadata class.