DataAnnotationsModelMetadataProvider Class
Implements the default model metadata provider.
Inheritance Hierarchy
System.Object
System.Web.Http.Metadata.ModelMetadataProvider
System.Web.Http.Metadata.Providers.AssociatedMetadataProvider<CachedDataAnnotationsModelMetadata>
System.Web.Http.Metadata.Providers.DataAnnotationsModelMetadataProvider
Namespace: System.Web.Http.Metadata.Providers
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
Public Class DataAnnotationsModelMetadataProvider _
Inherits AssociatedMetadataProvider(Of CachedDataAnnotationsModelMetadata)
'Usage
Dim instance As DataAnnotationsModelMetadataProvider
public class DataAnnotationsModelMetadataProvider : AssociatedMetadataProvider<CachedDataAnnotationsModelMetadata>
public ref class DataAnnotationsModelMetadataProvider : public AssociatedMetadataProvider<CachedDataAnnotationsModelMetadata^>
type DataAnnotationsModelMetadataProvider =
class
inherit AssociatedMetadataProvider<CachedDataAnnotationsModelMetadata>
end
public class DataAnnotationsModelMetadataProvider extends AssociatedMetadataProvider<CachedDataAnnotationsModelMetadata>
The DataAnnotationsModelMetadataProvider type exposes the following members.
Constructors
Name | Description | |
---|---|---|
DataAnnotationsModelMetadataProvider | Initializes a new instance of the DataAnnotationsModelMetadataProvider class. |
Top
Methods
Name | Description | |
---|---|---|
CreateMetadataFromPrototype | Creates the metadata from prototype for the specified property. (Overrides AssociatedMetadataProvider<TModelMetadata>.CreateMetadataFromPrototype(TModelMetadata, Func<Object>).) | |
CreateMetadataPrototype | Creates the metadata for the specified property. (Overrides AssociatedMetadataProvider<TModelMetadata>.CreateMetadataPrototype(IEnumerable<Attribute>, Type, Type, String).) | |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetMetadataForProperties | Retrieves a list of properties for the model. (Inherited from AssociatedMetadataProvider<TModelMetadata>.) | |
GetMetadataForProperty | Retrieves the metadata for the specified property using the container type and property name. (Inherited from AssociatedMetadataProvider<TModelMetadata>.) | |
GetMetadataForType | Returns the metadata for the specified property using the type of the model. (Inherited from AssociatedMetadataProvider<TModelMetadata>.) | |
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
ToString | (Inherited from Object.) |
Top
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.