CachedAssociatedMetadataProvider(Of TModelMetadata).GetMetadataForType Method

Returns the cached metadata for the specified property using the type of the model.

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

'Declaration
Public Overrides NotOverridable Function GetMetadataForType ( _
	modelAccessor As Func(Of Object), _
	modelType As Type _
) As ModelMetadata
'Usage
Dim instance As CachedAssociatedMetadataProvider 
Dim modelAccessor As Func(Of Object)
Dim modelType As Type 
Dim returnValue As ModelMetadata 

returnValue = instance.GetMetadataForType(modelAccessor, _
	modelType)

Parameters

modelAccessor
Type: System.Func(Of Object)

The model accessor.

modelType
Type: System.Type

The type of the container.

Return Value

Type: System.Web.Mvc.ModelMetadata
The cached metadata for the specified property using the type of the model.
Show: