ModelAttributes.GetAttributesForParameter 方法

定義

多載

GetAttributesForParameter(ParameterInfo)

取得指定 parameterInfo 之 的屬性。

GetAttributesForParameter(ParameterInfo, Type)

取得具有 parameterInfo 指定 modelType 之 的屬性。

GetAttributesForParameter(ParameterInfo)

取得指定 parameterInfo 之 的屬性。

public:
 static Microsoft::AspNetCore::Mvc::ModelBinding::ModelAttributes ^ GetAttributesForParameter(System::Reflection::ParameterInfo ^ parameterInfo);
public static Microsoft.AspNetCore.Mvc.ModelBinding.ModelAttributes GetAttributesForParameter (System.Reflection.ParameterInfo parameterInfo);
static member GetAttributesForParameter : System.Reflection.ParameterInfo -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelAttributes
Public Shared Function GetAttributesForParameter (parameterInfo As ParameterInfo) As ModelAttributes

參數

parameterInfo
ParameterInfo

需要 ParameterInfo 解析屬性的 。

傳回

ModelAttributes具有 參數屬性及其 Type 的 實例。

適用於

GetAttributesForParameter(ParameterInfo, Type)

取得具有 parameterInfo 指定 modelType 之 的屬性。

public:
 static Microsoft::AspNetCore::Mvc::ModelBinding::ModelAttributes ^ GetAttributesForParameter(System::Reflection::ParameterInfo ^ parameterInfo, Type ^ modelType);
public static Microsoft.AspNetCore.Mvc.ModelBinding.ModelAttributes GetAttributesForParameter (System.Reflection.ParameterInfo parameterInfo, Type modelType);
static member GetAttributesForParameter : System.Reflection.ParameterInfo * Type -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelAttributes
Public Shared Function GetAttributesForParameter (parameterInfo As ParameterInfo, modelType As Type) As ModelAttributes

參數

parameterInfo
ParameterInfo

需要 ParameterInfo 解析屬性的 。

modelType
Type

模型型別。

傳回

ModelAttributes具有 參數屬性及其 Type 的 實例。

適用於