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)

Inheritance Hierarchy

System.Object
  System.Web.Mvc.ModelMetadataProvider
    System.Web.Mvc.AssociatedMetadataProvider
      System.Web.Mvc.EmptyModelMetadataProvider

Syntax

public class EmptyModelMetadataProvider : AssociatedMetadataProvider
public ref class EmptyModelMetadataProvider : AssociatedMetadataProvider
type EmptyModelMetadataProvider = 
    class
        inherit AssociatedMetadataProvider
    end
Public Class EmptyModelMetadataProvider
    Inherits AssociatedMetadataProvider

Constructors

Name Description
System_CAPS_pubmethod EmptyModelMetadataProvider()

Initializes a new instance of the EmptyModelMetadataProvider class.

Methods

Name Description
System_CAPS_protmethod CreateMetadata(IEnumerable<Attribute>, Type, Func<Object>, Type, String)

Creates a new instance of the ModelMetadata class.(Overrides AssociatedMetadataProvider.CreateMetadata(IEnumerable<Attribute>, Type, Func<Object>, Type, String).)

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod FilterAttributes(Type, PropertyDescriptor, IEnumerable<Attribute>)

Gets a list of attributes.(Inherited from AssociatedMetadataProvider.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetMetadataForProperties(Object, Type)

Returns a list of properties for the model.(Inherited from AssociatedMetadataProvider.)

System_CAPS_protmethod GetMetadataForProperty(Func<Object>, Type, PropertyDescriptor)

Returns the metadata for the specified property using the container type and property descriptor.(Inherited from AssociatedMetadataProvider.)

System_CAPS_pubmethod GetMetadataForProperty(Func<Object>, Type, String)

Returns the metadata for the specified property using the container type and property name.(Inherited from AssociatedMetadataProvider.)

System_CAPS_pubmethod GetMetadataForType(Func<Object>, Type)

Returns the metadata for the specified property using the type of the model.(Inherited from AssociatedMetadataProvider.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod GetTypeDescriptor(Type)

Returns the type descriptor from the specified type.(Inherited from AssociatedMetadataProvider.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Remarks

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.

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

Return to top