AssociatedMetadataProvider::GetMetadataForProperty Method

 

Returns the metadata for the specified property.

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

NameDescription
System_CAPS_protmethodGetMetadataForProperty(Func<Object^>^, Type^, PropertyDescriptor^)

Returns the metadata for the specified property using the container type and property descriptor.

System_CAPS_pubmethodGetMetadataForProperty(Func<Object^>^, Type^, String^)

Returns the metadata for the specified property using the container type and property name.(Overrides ModelMetadataProvider::GetMetadataForProperty(Func<Object^>^, Type^, String^).)

Return to top

AssociatedMetadataProvider::GetMetadataForProperty Method (Func<Object^>^, Type^, PropertyDescriptor^)

Returns the metadata for the specified property using the container type and property descriptor.

protected:
virtual ModelMetadata^ GetMetadataForProperty(
	Func<Object^>^ modelAccessor,
	Type^ containerType,
	PropertyDescriptor^ propertyDescriptor
)

Parameters

modelAccessor
Type: System::Func<Object^>^

The model accessor.

containerType
Type: System::Type^

The type of the container.

propertyDescriptor
Type: System.ComponentModel::PropertyDescriptor^

The property descriptor

Return Value

Type: System.Web.Mvc::ModelMetadata^

The metadata for the specified property using the container type and property descriptor.

Return to top

AssociatedMetadataProvider::GetMetadataForProperty Method (Func<Object^>^, Type^, String^)

Returns the metadata for the specified property using the container type and property name.

public:
virtual ModelMetadata^ GetMetadataForProperty(
	Func<Object^>^ modelAccessor,
	Type^ containerType,
	String^ propertyName
) override

Parameters

modelAccessor
Type: System::Func<Object^>^

The model accessor.

containerType
Type: System::Type^

The type of the container.

propertyName
Type: System::String^

The name of the property.

Return Value

Type: System.Web.Mvc::ModelMetadata^

The metadata for the specified property using the container type and property name.

Return to top
Show: