Dela via


ModelMetadataIdentity.ForProperty Method

Definition

Overloads

ForProperty(PropertyInfo, Type, Type)

Creates a ModelMetadataIdentity for the provided property.

ForProperty(Type, String, Type)
Obsolete.
Obsolete.

Creates a ModelMetadataIdentity for the provided property.

ForProperty(PropertyInfo, Type, Type)

Source:
ModelMetadataIdentity.cs

Creates a ModelMetadataIdentity for the provided property.

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

Parameters

propertyInfo
PropertyInfo

The property.

modelType
Type

The model type.

containerType
Type

The container type of the model property.

Returns

A ModelMetadataIdentity.

Applies to

ForProperty(Type, String, Type)

Source:
ModelMetadataIdentity.cs
Source:
ModelMetadataIdentity.cs
Source:
ModelMetadataIdentity.cs

Caution

This API is obsolete and may be removed in a future release.

Caution

This API is obsolete and may be removed in a future release. Please use the overload that takes a PropertyInfo object.

Creates a ModelMetadataIdentity for the provided property.

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

Parameters

modelType
Type

The model type.

name
String

The name of the property.

containerType
Type

The container type of the model property.

Returns

A ModelMetadataIdentity.

Attributes

Applies to