AssociatedMetadataProvider.CreateMetadata Method

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

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

'Declaration
Protected MustOverride 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)

Parameters

attributes
Type: System.Collections.Generic.IEnumerable(Of Attribute)

The set of attributes.

containerType
Type: System.Type

The type of the container.

modelAccessor
Type: System.Func(Of Object)

The model accessor.

modelType
Type: System.Type

The type of the model.

propertyName
Type: System.String

The name of the property.

Return Value

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