ModelMetadataProviderExtensions.GetMetadataForProperty 方法

定义

ModelMetadata获取由提供的 containerTypepropertyName标识的属性的 。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Mvc::ModelBinding::ModelMetadata ^ GetMetadataForProperty(Microsoft::AspNetCore::Mvc::ModelBinding::IModelMetadataProvider ^ provider, Type ^ containerType, System::String ^ propertyName);
public static Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata GetMetadataForProperty (this Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider provider, Type containerType, string propertyName);
static member GetMetadataForProperty : Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider * Type * string -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata
<Extension()>
Public Function GetMetadataForProperty (provider As IModelMetadataProvider, containerType As Type, propertyName As String) As ModelMetadata

参数

containerType
Type

Type为其定义属性的 。

propertyName
String

属性名称。

返回

ModelMetadata属性的 。

适用于