Partager via


AssociatedMetadataProvider<TModelMetadata>.CreateMetadataFromPrototype Method

When overridden in a derived class, creates the model metadata for the property using the specified prototype.

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

Syntax

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

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

Parameters

  • prototype
    Type: TModelMetadata

    The prototype from which to create the model metadata.

Return Value

Type: TModelMetadata
The model metadata for the property.

See Also

Reference

AssociatedMetadataProvider<TModelMetadata> Class

System.Web.Http.Metadata.Providers Namespace