共用方式為


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屬性的 。

適用於