共用方式為


EmptyModelMetadataProvider.CreateMetadata 方法

定義

建立 ModelMetadata 類別的新執行個體。

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

模型的名稱。

傳回

ModelMetadata 類別的新執行個體。

適用於