EmptyModelMetadataProvider Class

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

Inheritance Hierarchy


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


Public Class EmptyModelMetadataProvider _
    Inherits AssociatedMetadataProvider
Dim instance As EmptyModelMetadataProvider
public class EmptyModelMetadataProvider : AssociatedMetadataProvider
public ref class EmptyModelMetadataProvider : public AssociatedMetadataProvider
type EmptyModelMetadataProvider =  
        inherit AssociatedMetadataProvider 
public class EmptyModelMetadataProvider extends AssociatedMetadataProvider

The EmptyModelMetadataProvider type exposes the following members.


  Name Description
Public method EmptyModelMetadataProvider Initializes a new instance of the EmptyModelMetadataProvider class.



  Name Description
Protected method CreateMetadata Creates a new instance of the ModelMetadata class. (Overrides AssociatedMetadataProvider.CreateMetadata(IEnumerable<Attribute>, Type, Func<Object>, Type, String).)
Public method Equals (Inherited from Object.)
Protected method FilterAttributes Gets a list of attributes. (Inherited from AssociatedMetadataProvider.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetMetadataForProperties Returns a list of properties for the model. (Inherited from AssociatedMetadataProvider.)
Protected method GetMetadataForProperty(Func<Object>, Type, PropertyDescriptor) Returns the metadata for the specified property using the container type and property descriptor. (Inherited from AssociatedMetadataProvider.)
Public method GetMetadataForProperty(Func<Object>, Type, String) Returns the metadata for the specified property using the container type and property name. (Inherited from AssociatedMetadataProvider.)
Public method GetMetadataForType Returns the metadata for the specified property using the type of the model. (Inherited from AssociatedMetadataProvider.)
Public method GetType (Inherited from Object.)
Protected method GetTypeDescriptor Returns the type descriptor from the specified type. (Inherited from AssociatedMetadataProvider.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)



MVC requires that a data model be configured to use a metadata provider. Set Current to nulla null reference (Nothing in Visual Basic) to set the current metadata provider to the EmptyModelMetadataProvider provider.

Thread Safety

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

See Also


System.Web.Mvc Namespace