共用方式為


AssociatedMetadataProvider.GetMetadataForType 方法

定義

在衍生類別中覆寫時,傳回模型型別的中繼資料。

public:
 override System::Web::ModelBinding::ModelMetadata ^ GetMetadataForType(Func<System::Object ^> ^ modelAccessor, Type ^ modelType);
public override System.Web.ModelBinding.ModelMetadata GetMetadataForType (Func<object> modelAccessor, Type modelType);
override this.GetMetadataForType : Func<obj> * Type -> System.Web.ModelBinding.ModelMetadata
Public Overrides Function GetMetadataForType (modelAccessor As Func(Of Object), modelType As Type) As ModelMetadata

參數

modelAccessor
Func<Object>

模型存取子。

modelType
Type

模型的型別。

傳回

ModelMetadata

模型型別的中繼資料。

例外狀況

modelType 參數為 null

適用於