AssociatedMetadataProvider<TModelMetadata>.GetMetadataForProperty Method
Retrieves the metadata for the specified property using the container type and property name.
Namespace: System.Web.Http.Metadata.Providers
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
Public Overrides NotOverridable Function GetMetadataForProperty ( _
modelAccessor As Func(Of Object), _
containerType As Type, _
propertyName As String _
) As ModelMetadata
'Usage
Dim instance As AssociatedMetadataProvider
Dim modelAccessor As Func(Of Object)
Dim containerType As Type
Dim propertyName As String
Dim returnValue As ModelMetadata
returnValue = instance.GetMetadataForProperty(modelAccessor, _
containerType, propertyName)
public override sealed ModelMetadata GetMetadataForProperty(
Func<Object> modelAccessor,
Type containerType,
string propertyName
)
public:
virtual ModelMetadata^ GetMetadataForProperty(
Func<Object^>^ modelAccessor,
Type^ containerType,
String^ propertyName
) override sealed
abstract GetMetadataForProperty :
modelAccessor:Func<Object> *
containerType:Type *
propertyName:string -> ModelMetadata
override GetMetadataForProperty :
modelAccessor:Func<Object> *
containerType:Type *
propertyName:string -> ModelMetadata
public override final function GetMetadataForProperty(
modelAccessor : Func<Object>,
containerType : Type,
propertyName : String
) : ModelMetadata
Parameters
modelAccessor
Type: System.Func<Object>The model accessor.
containerType
Type: System.TypeThe type of the container.
propertyName
Type: System.StringThe name of the property.
Return Value
Type: System.Web.Http.Metadata.ModelMetadata
The metadata for the specified property.