Partager via


AssociatedMetadataProvider<TModelMetadata> Class

Provides an abstract class to implement a metadata provider.

Inheritance Hierarchy

System.Object
  System.Web.Http.Metadata.ModelMetadataProvider
    System.Web.Http.Metadata.Providers.AssociatedMetadataProvider<TModelMetadata>
      System.Web.Http.Metadata.Providers.DataAnnotationsModelMetadataProvider
      System.Web.Http.Metadata.Providers.EmptyModelMetadataProvider

Namespace:  System.Web.Http.Metadata.Providers
Assembly:  System.Web.Http (in System.Web.Http.dll)

Syntax

'Declaration
Public MustInherit Class AssociatedMetadataProvider(Of TModelMetadata As ModelMetadata) _
    Inherits ModelMetadataProvider
'Usage
Dim instance As AssociatedMetadataProvider(Of TModelMetadata)
public abstract class AssociatedMetadataProvider<TModelMetadata> : ModelMetadataProvider 
where TModelMetadata : ModelMetadata
generic<typename TModelMetadata>
where TModelMetadata : ModelMetadata 
public ref class AssociatedMetadataProvider abstract : public ModelMetadataProvider
[<AbstractClassAttribute>]
type AssociatedMetadataProvider<'TModelMetadata when 'TModelMetadata : ModelMetadata> =  
    class 
        inherit ModelMetadataProvider 
    end
JScript does not support generic types and methods.

Type Parameters

  • TModelMetadata
    The type of the model metadata.

The AssociatedMetadataProvider<TModelMetadata> type exposes the following members.

Constructors

  Name Description
Protected method AssociatedMetadataProvider<TModelMetadata> Initializes a new instance of the AssociatedMetadataProvider<TModelMetadata> class.

Top

Methods

  Name Description
Protected method CreateMetadataFromPrototype When overridden in a derived class, creates the model metadata for the property using the specified prototype.
Protected method CreateMetadataPrototype When overridden in a derived class, creates the model metadata for the property.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Public method GetMetadataForProperties Retrieves a list of properties for the model. (Overrides ModelMetadataProvider.GetMetadataForProperties(Object, Type).)
Public method GetMetadataForProperty Retrieves the metadata for the specified property using the container type and property name. (Overrides ModelMetadataProvider.GetMetadataForProperty(Func<Object>, Type, String).)
Public method GetMetadataForType Returns the metadata for the specified property using the type of the model. (Overrides ModelMetadataProvider.GetMetadataForType(Func<Object>, Type).)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method 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.

See Also

Reference

System.Web.Http.Metadata.Providers Namespace