Freigeben über


DataAnnotationsModelMetadataProvider.CreateMetadata Methode

Definition

Ruft die Metadaten für die angegebene Eigenschaft ab.

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

Parameter

attributes
IEnumerable<Attribute>

Die Attribute.

containerType
Type

Der Typ des Containers.

modelAccessor
Func<Object>

Der Modellaccessor.

modelType
Type

Der Typ des Modells.

propertyName
String

Der Name der Eigenschaft.

Gibt zurück

Die Metadaten für die Eigenschaft.

Gilt für: