AssociatedMetadataProvider.CreateMetadata Метод

Определение

При переопределении в производном классе создает метаданные для модели.

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

Параметры

attributes
IEnumerable<Attribute>

Атрибуты.

containerType
Type

Тип контейнера или значение null, если контейнер не существует.

modelAccessor
Func<Object>

Метод доступа модели.

modelType
Type

Тип модели.

propertyName
String

Имя свойства или null, если модель не является свойством.

Возвращаемое значение

Метаданные для модели.

Применяется к