Dela via


ModelMetadataProvider.GetMetadataForProperty(PropertyInfo, Type) Method

Definition

Supplies metadata describing a property.

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

Parameters

propertyInfo
PropertyInfo

The PropertyInfo.

modelType
Type

The actual model type.

Returns

A ModelMetadata instance describing the propertyInfo.

Applies to