ModelMetadataProvider.GetMetadataForParameter 方法

定义

重载

GetMetadataForParameter(ParameterInfo)

提供描述参数的元数据。

GetMetadataForParameter(ParameterInfo, Type)

提供描述参数的元数据。

GetMetadataForParameter(ParameterInfo)

提供描述参数的元数据。

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)

提供描述参数的元数据。

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实例。

适用于