ModelMetadataProvider.GetMetadataForParameter 方法

定義

多載

GetMetadataForParameter(ParameterInfo)

提供描述參數的中繼資料。

GetMetadataForParameter(ParameterInfo, Type)

提供描述參數的中繼資料。

GetMetadataForParameter(ParameterInfo)

來源:
ModelMetadataProvider.cs

提供描述參數的中繼資料。

public:
 abstract Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ GetMetadataForParameter(System::Reflection::ParameterInfo ^ parameter);
public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata GetMetadataForParameter (System.Reflection.ParameterInfo parameter);
abstract member GetMetadataForParameter : System.Reflection.ParameterInfo -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata
Public MustOverride Function GetMetadataForParameter (parameter As ParameterInfo) As ModelMetadata

參數

傳回

描述 ModelMetadataparameter 實例。

適用於

GetMetadataForParameter(ParameterInfo, Type)

來源:
ModelMetadataProvider.cs

提供描述參數的中繼資料。

public:
 virtual Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ GetMetadataForParameter(System::Reflection::ParameterInfo ^ parameter, Type ^ modelType);
public virtual Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata GetMetadataForParameter (System.Reflection.ParameterInfo parameter, Type modelType);
abstract member GetMetadataForParameter : System.Reflection.ParameterInfo * Type -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata
override this.GetMetadataForParameter : System.Reflection.ParameterInfo * Type -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata
Public Overridable Function GetMetadataForParameter (parameter As ParameterInfo, modelType As Type) As ModelMetadata

參數

modelType
Type

實際模型類型。

傳回

描述 ModelMetadataparameter 實例。

適用於