AssociatedMetadataProvider.CreateMetadata Methode

Definition

Erstellt beim Überschreiben in einer abgeleiteten Klasse die Metadaten für ein Modell.

protected:
 abstract System::Web::ModelBinding::ModelMetadata ^ CreateMetadata(System::Collections::Generic::IEnumerable<Attribute ^> ^ attributes, Type ^ containerType, Func<System::Object ^> ^ modelAccessor, Type ^ modelType, System::String ^ propertyName);
protected abstract System.Web.ModelBinding.ModelMetadata CreateMetadata (System.Collections.Generic.IEnumerable<Attribute> attributes, Type containerType, Func<object> modelAccessor, Type modelType, string propertyName);
abstract member CreateMetadata : seq<Attribute> * Type * Func<obj> * Type * string -> System.Web.ModelBinding.ModelMetadata
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

Parameter

attributes
IEnumerable<Attribute>

Die Attribute.

containerType
Type

Der Typ des Containers oder null, wenn kein Container vorhanden sind.

modelAccessor
Func<Object>

Der Modellaccessor.

modelType
Type

Der Typ des Modells.

propertyName
String

Der Name der Eigenschaft oder null, wenn das Modell keine Eigenschaft ist.

Gibt zurück

ModelMetadata

Metadaten für ein Modell.

Gilt für: