DataAnnotationsModelMetadataProvider.CreateMetadata Method

Definition

Gets the metadata for the specified property.

protected override System.Web.Mvc.ModelMetadata CreateMetadata (System.Collections.Generic.IEnumerable<Attribute> attributes, Type containerType, Func<object> modelAccessor, Type modelType, string propertyName);
override this.CreateMetadata : seq<Attribute> * Type * Func<obj> * Type * string -> System.Web.Mvc.ModelMetadata
Protected Overrides Function CreateMetadata (attributes As IEnumerable(Of Attribute), containerType As Type, modelAccessor As Func(Of Object), modelType As Type, propertyName As String) As ModelMetadata

Parameters

attributes
IEnumerable<Attribute>

The attributes.

containerType
Type

The type of the container.

modelAccessor
Func<Object>

The model accessor.

modelType
Type

The type of the model.

propertyName
String

The name of the property.

Returns

The metadata for the property.

Applies to