共用方式為


ModelMetadataIdentity.ForProperty 方法

定義

多載

ForProperty(PropertyInfo, Type, Type)

ModelMetadataIdentity建立所提供屬性的 。

ForProperty(Type, String, Type)
已淘汰.
已淘汰.

ModelMetadataIdentity建立所提供屬性的 。

ForProperty(PropertyInfo, Type, Type)

來源:
ModelMetadataIdentity.cs

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

模型屬性的容器類型。

傳回

ModelMetadataIdentity

適用於

ForProperty(Type, String, Type)

來源:
ModelMetadataIdentity.cs
來源:
ModelMetadataIdentity.cs
來源:
ModelMetadataIdentity.cs

警告

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

模型屬性的容器類型。

傳回

ModelMetadataIdentity

屬性

適用於