ModelMetadataProvider.GetMetadataForProperty(PropertyInfo, Type) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
.