Aracılığıyla paylaş


DataAnnotationsModelMetadataProvider.CreateMetadata Yöntem

Tanım

Belirtilen model için meta veriler oluşturur.

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

Parametreler

attributes
IEnumerable<Attribute>

Öznitelikler.

containerType
Type

Kapsayıcının türü veya null kapsayıcı yoksa.

modelAccessor
Func<Object>

Model erişimcisi.

modelType
Type

Modelin türü.

propertyName
String

Özelliğin adı veya null modelin bir özellik olup olmadığını.

Döndürülenler

ModelMetadata

Modelin meta verileri.

Şunlara uygulanır