CachedAssociatedMetadataProvider<TModelMetadata>.CreateMetadata Method

When overridden in a derived class, creates the cached model metadata for the property.

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

Syntax

'Declaration
Protected Overrides NotOverridable Function CreateMetadata ( _
    attributes As IEnumerable(Of Attribute), _
    containerType As Type, _
    modelAccessor As Func(Of Object), _
    modelType As Type, _
    propertyName As String _
) As ModelMetadata
'Usage
Dim attributes As IEnumerable(Of Attribute)
Dim containerType As Type 
Dim modelAccessor As Func(Of Object)
Dim modelType As Type 
Dim propertyName As String 
Dim returnValue As ModelMetadata 

returnValue = Me.CreateMetadata(attributes, _
    containerType, modelAccessor, modelType, _
    propertyName)
protected override sealed ModelMetadata CreateMetadata(
    IEnumerable<Attribute> attributes,
    Type containerType,
    Func<Object> modelAccessor,
    Type modelType,
    string propertyName
)
protected:
virtual ModelMetadata^ CreateMetadata(
    IEnumerable<Attribute^>^ attributes, 
    Type^ containerType, 
    Func<Object^>^ modelAccessor, 
    Type^ modelType, 
    String^ propertyName
) override sealed
abstract CreateMetadata : 
        attributes:IEnumerable<Attribute> * 
        containerType:Type * 
        modelAccessor:Func<Object> * 
        modelType:Type * 
        propertyName:string -> ModelMetadata  
override CreateMetadata : 
        attributes:IEnumerable<Attribute> * 
        containerType:Type * 
        modelAccessor:Func<Object> * 
        modelType:Type * 
        propertyName:string -> ModelMetadata
protected override final function CreateMetadata(
    attributes : IEnumerable<Attribute>, 
    containerType : Type, 
    modelAccessor : Func<Object>, 
    modelType : Type, 
    propertyName : String
) : ModelMetadata

Parameters

Return Value

Type: System.Web.Mvc.ModelMetadata
The cached model metadata for the property.

See Also

Reference

CachedAssociatedMetadataProvider<TModelMetadata> Class

System.Web.Mvc Namespace