ModelAttributes.GetAttributesForProperty Method

Definition

Overloads

GetAttributesForProperty(Type, PropertyInfo)

Gets the attributes for the given property.

GetAttributesForProperty(Type, PropertyInfo, Type)

Gets the attributes for the given property with the specified modelType.

GetAttributesForProperty(Type, PropertyInfo)

Source:
ModelAttributes.cs
Source:
ModelAttributes.cs
Source:
ModelAttributes.cs

Gets the attributes for the given 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

Parameters

type
Type

The Type in which caller found property.

property
PropertyInfo

A PropertyInfo for which attributes need to be resolved.

Returns

A ModelAttributes instance with the attributes of the property and its Type.

Applies to

GetAttributesForProperty(Type, PropertyInfo, Type)

Source:
ModelAttributes.cs
Source:
ModelAttributes.cs

Gets the attributes for the given property with the specified 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

Parameters

containerType
Type

The Type in which caller found property.

property
PropertyInfo

A PropertyInfo for which attributes need to be resolved.

modelType
Type

The model type

Returns

A ModelAttributes instance with the attributes of the property and its Type.

Applies to