DataAnnotationsModelMetadataProvider.CreateMetadata Metódus

Definíció

Metaadatokat hoz létre egy adott modellhez.

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

Paraméterek

attributes
IEnumerable<Attribute>

Az attribútumok.

containerType
Type

A tároló típusa, vagy null ha nincs tároló.

modelAccessor
Func<Object>

A modell tartozéka.

modelType
Type

A modell típusa.

propertyName
String

A tulajdonság neve, vagy null ha a modell nem tulajdonság.

Válaszok

Modell metaadatai.

A következőre érvényes: