ModelMetadataIdentity.ForProperty 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ForProperty(PropertyInfo, Type, Type) |
ModelMetadataIdentity建立所提供屬性的 。 |
ForProperty(Type, String, Type) |
已淘汰.
已淘汰.
ModelMetadataIdentity建立所提供屬性的 。 |
ForProperty(PropertyInfo, Type, Type)
ModelMetadataIdentity建立所提供屬性的 。
public:
static Microsoft::AspNetCore::Mvc::ModelBinding::Metadata::ModelMetadataIdentity ForProperty(System::Reflection::PropertyInfo ^ propertyInfo, Type ^ modelType, Type ^ containerType);
public static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity ForProperty (System.Reflection.PropertyInfo propertyInfo, Type modelType, Type containerType);
static member ForProperty : System.Reflection.PropertyInfo * Type * Type -> Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity
Public Shared Function ForProperty (propertyInfo As PropertyInfo, modelType As Type, containerType As Type) As ModelMetadataIdentity
參數
- propertyInfo
- PropertyInfo
屬性。
- modelType
- Type
模型型別。
- containerType
- Type
模型屬性的容器類型。
傳回
適用於
ForProperty(Type, String, Type)
警告
This API is obsolete and may be removed in a future release.
警告
This API is obsolete and may be removed in a future release. Please use the overload that takes a PropertyInfo object.
ModelMetadataIdentity建立所提供屬性的 。
public:
static Microsoft::AspNetCore::Mvc::ModelBinding::Metadata::ModelMetadataIdentity ForProperty(Type ^ modelType, System::String ^ name, Type ^ containerType);
public static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity ForProperty (Type modelType, string name, Type containerType);
[System.Obsolete("This API is obsolete and may be removed in a future release.")]
public static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity ForProperty (Type modelType, string name, Type containerType);
[System.Obsolete("This API is obsolete and may be removed in a future release. Please use the overload that takes a PropertyInfo object.")]
public static Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity ForProperty (Type modelType, string name, Type containerType);
static member ForProperty : Type * string * Type -> Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity
[<System.Obsolete("This API is obsolete and may be removed in a future release.")>]
static member ForProperty : Type * string * Type -> Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity
[<System.Obsolete("This API is obsolete and may be removed in a future release. Please use the overload that takes a PropertyInfo object.")>]
static member ForProperty : Type * string * Type -> Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelMetadataIdentity
Public Shared Function ForProperty (modelType As Type, name As String, containerType As Type) As ModelMetadataIdentity
參數
- modelType
- Type
模型型別。
- name
- String
屬性的名稱。
- containerType
- Type
模型屬性的容器類型。
傳回
- 屬性