EmptyModelMetadataProvider Class
Provides an empty metadata provider for data models that do not require metadata.
Inheritance Hierarchy
System.Object
System.Web.Mvc.ModelMetadataProvider
System.Web.Mvc.AssociatedMetadataProvider
System.Web.Mvc.EmptyModelMetadataProvider
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Syntax
'Declaration
Public Class EmptyModelMetadataProvider _
Inherits AssociatedMetadataProvider
public class EmptyModelMetadataProvider : AssociatedMetadataProvider
public ref class EmptyModelMetadataProvider : public AssociatedMetadataProvider
The EmptyModelMetadataProvider type exposes the following members.
Constructors
Name | Description | |
---|---|---|
EmptyModelMetadataProvider | Initializes a new instance of the EmptyModelMetadataProvider class. |
Top
Methods
Name | Description | |
---|---|---|
CreateMetadata | Creates a new instance of the ModelMetadata class. (Overrides AssociatedMetadataProvider.CreateMetadata(IEnumerable<Attribute>, Type, Func<Object>, Type, String).) | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
FilterAttributes | Gets a list of attributes. (Inherited from AssociatedMetadataProvider.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetMetadataForProperties | Returns a list of properties for the model. (Inherited from AssociatedMetadataProvider.) | |
GetMetadataForProperty(Func<Object>, Type, PropertyDescriptor) | Returns the metadata for the specified property using the container type and property descriptor. (Inherited from AssociatedMetadataProvider.) | |
GetMetadataForProperty(Func<Object>, Type, String) | Returns the metadata for the specified property using the container type and property name. (Inherited from AssociatedMetadataProvider.) | |
GetMetadataForType | Returns the metadata for the specified property using the type of the model. (Inherited from AssociatedMetadataProvider.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetTypeDescriptor | Returns the type descriptor from the specified type. (Inherited from AssociatedMetadataProvider.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Remarks
MVC requires that a data model be configured to use a metadata provider. Set Current to 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.