Table of Contents

Class ModelMetadataProvider

Namespace
System.Web.Http.Metadata
Assembly
System.Web.Http.dll

No content here will be updated; please do not add material here.

public abstract class ModelMetadataProvider
Inheritance
ModelMetadataProvider
Derived
Inherited Members

Constructors

ModelMetadataProvider()

Initializes a new instance of the ModelMetadataProvider class.

protected ModelMetadataProvider()

Methods

GetMetadataForProperties(object, Type)

Gets a ModelMetadata object for each property of a model.

public abstract IEnumerable<ModelMetadata> GetMetadataForProperties(object container, Type containerType)

Parameters

container object

The container.

containerType Type

The type of the container.

Returns

IEnumerable<ModelMetadata>

A ModelMetadata object for each property of a model.

GetMetadataForProperty(Func<object>, Type, string)

Get metadata for the specified property.

public abstract ModelMetadata GetMetadataForProperty(Func<object> modelAccessor, Type containerType, string propertyName)

Parameters

modelAccessor Func<object>

The model accessor.

containerType Type

The type of the container.

propertyName string

The property to get the metadata model for.

Returns

ModelMetadata

The metadata model for the specified property.

GetMetadataForType(Func<object>, Type)

Gets the metadata for the specified model accessor and model type.

public abstract ModelMetadata GetMetadataForType(Func<object> modelAccessor, Type modelType)

Parameters

modelAccessor Func<object>

The model accessor.

modelType Type

The type of the mode.

Returns

ModelMetadata

The metadata.