ModelAttributes.GetAttributesForProperty 方法

定義

多載

GetAttributesForProperty(Type, PropertyInfo)

取得指定 property 之 的屬性。

GetAttributesForProperty(Type, PropertyInfo, Type)

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

GetAttributesForProperty(Type, PropertyInfo)

取得指定 property 之 的屬性。

public:
 static Microsoft::AspNetCore::Mvc::ModelBinding::ModelAttributes ^ GetAttributesForProperty(Type ^ type, System::Reflection::PropertyInfo ^ property);
public static Microsoft.AspNetCore.Mvc.ModelBinding.ModelAttributes GetAttributesForProperty (Type type, System.Reflection.PropertyInfo property);
static member GetAttributesForProperty : Type * System.Reflection.PropertyInfo -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelAttributes
Public Shared Function GetAttributesForProperty (type As Type, property As PropertyInfo) As ModelAttributes

參數

type
Type

呼叫 Type 端在其中找到 property 的 。

property
PropertyInfo

需要 PropertyInfo 解析其屬性的 。

傳回

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

適用於

GetAttributesForProperty(Type, PropertyInfo, Type)

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

public:
 static Microsoft::AspNetCore::Mvc::ModelBinding::ModelAttributes ^ GetAttributesForProperty(Type ^ containerType, System::Reflection::PropertyInfo ^ property, Type ^ modelType);
public static Microsoft.AspNetCore.Mvc.ModelBinding.ModelAttributes GetAttributesForProperty (Type containerType, System.Reflection.PropertyInfo property, Type modelType);
static member GetAttributesForProperty : Type * System.Reflection.PropertyInfo * Type -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelAttributes
Public Shared Function GetAttributesForProperty (containerType As Type, property As PropertyInfo, modelType As Type) As ModelAttributes

參數

containerType
Type

呼叫 Type 端在其中找到 property 的 。

property
PropertyInfo

需要 PropertyInfo 解析其屬性的 。

modelType
Type

模型類型

傳回

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

適用於