Compartilhar via


DataAnnotationsModelMetadataProvider.CreateMetadataFromPrototype Method

Creates the metadata from prototype for the specified property.

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

Syntax

'Declaration
Protected Overrides Function CreateMetadataFromPrototype ( _
    prototype As CachedDataAnnotationsModelMetadata, _
    modelAccessor As Func(Of Object) _
) As CachedDataAnnotationsModelMetadata
'Usage
Dim prototype As CachedDataAnnotationsModelMetadata 
Dim modelAccessor As Func(Of Object)
Dim returnValue As CachedDataAnnotationsModelMetadata 

returnValue = Me.CreateMetadataFromPrototype(prototype, _
    modelAccessor)
protected override CachedDataAnnotationsModelMetadata CreateMetadataFromPrototype(
    CachedDataAnnotationsModelMetadata prototype,
    Func<Object> modelAccessor
)
protected:
virtual CachedDataAnnotationsModelMetadata^ CreateMetadataFromPrototype(
    CachedDataAnnotationsModelMetadata^ prototype, 
    Func<Object^>^ modelAccessor
) override
abstract CreateMetadataFromPrototype : 
        prototype:CachedDataAnnotationsModelMetadata * 
        modelAccessor:Func<Object> -> CachedDataAnnotationsModelMetadata  
override CreateMetadataFromPrototype : 
        prototype:CachedDataAnnotationsModelMetadata * 
        modelAccessor:Func<Object> -> CachedDataAnnotationsModelMetadata
protected override function CreateMetadataFromPrototype(
    prototype : CachedDataAnnotationsModelMetadata, 
    modelAccessor : Func<Object>
) : CachedDataAnnotationsModelMetadata

Parameters

Return Value

Type: System.Web.Http.Metadata.Providers.CachedDataAnnotationsModelMetadata
The metadata for the property.

See Also

Reference

DataAnnotationsModelMetadataProvider Class

System.Web.Http.Metadata.Providers Namespace