Table of Contents

Class EmptyModelMetadataProvider

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

Provides an empty metadata provider for data models that do not require metadata.

public class EmptyModelMetadataProvider : AssociatedMetadataProvider
Inheritance
EmptyModelMetadataProvider
Inherited Members

Constructors

EmptyModelMetadataProvider()

Initializes a new instance of the EmptyModelMetadataProvider class.

public EmptyModelMetadataProvider()

Methods

CreateMetadata(IEnumerable<Attribute>, Type, Func<object>, Type, string)

Creates a new instance of the ModelMetadata class.

protected override ModelMetadata CreateMetadata(IEnumerable<Attribute> attributes, Type containerType, Func<object> modelAccessor, Type modelType, string propertyName)

Parameters

attributes IEnumerable<Attribute>

The attributes.

containerType Type

The type of the container.

modelAccessor Func<object>

The model accessor.

modelType Type

The type of the model.

propertyName string

The name of the model.

Returns

ModelMetadata

A new instance of the ModelMetadata class.