CachedAssociatedMetadataProvider<TModelMetadata>.CreateMetadata 方法

定义

在派生类中重写时,创建属性的已缓存模型元数据。

protected override sealed 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 NotOverridable 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

容器类型。

modelAccessor
Func<Object>

模型访问器。

modelType
Type

模型类型。

propertyName
String

属性名称。

返回

属性的已缓存模型元数据。

适用于