EmptyModelMetadataProvider Class

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

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

public class EmptyModelMetadataProvider : AssociatedMetadataProvider

The EmptyModelMetadataProvider type exposes the following members.

Public methodEmptyModelMetadataProviderInitializes a new instance of the EmptyModelMetadataProvider class.

Protected methodCreateMetadataCreates a new instance of the ModelMetadata class. (Overrides AssociatedMetadataProvider.CreateMetadata(IEnumerable<Attribute>, Type, Func<Object>, Type, String).)
Public methodEquals (Inherited from Object.)
Protected methodFilterAttributesGets a list of attributes. (Inherited from AssociatedMetadataProvider.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetMetadataForPropertiesReturns a list of properties for the model. (Inherited from AssociatedMetadataProvider.)
Protected methodGetMetadataForProperty(Func<Object>, Type, PropertyDescriptor)Returns the metadata for the specified property using the container type and property descriptor. (Inherited from AssociatedMetadataProvider.)
Public methodGetMetadataForProperty(Func<Object>, Type, String)Returns the metadata for the specified property using the container type and property name. (Inherited from AssociatedMetadataProvider.)
Public methodGetMetadataForTypeReturns the metadata for the specified property using the type of the model. (Inherited from AssociatedMetadataProvider.)
Public methodGetType (Inherited from Object.)
Protected methodGetTypeDescriptorReturns the type descriptor from the specified type. (Inherited from AssociatedMetadataProvider.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)

MVC requires that a data model be configured to use a metadata provider. Set Current to null to set the current metadata provider to the EmptyModelMetadataProvider provider.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.