Partager via


ModelMetadata Constructor

Initializes a new instance of the ModelMetadata class.

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

Syntax

'Declaration
Public Sub New ( _
    provider As ModelMetadataProvider, _
    containerType As Type, _
    modelAccessor As Func(Of Object), _
    modelType As Type, _
    propertyName As String _
)
'Usage
Dim provider As ModelMetadataProvider 
Dim containerType As Type 
Dim modelAccessor As Func(Of Object)
Dim modelType As Type 
Dim propertyName As String 

Dim instance As New ModelMetadata(provider, _
    containerType, modelAccessor, modelType, _
    propertyName)
public ModelMetadata(
    ModelMetadataProvider provider,
    Type containerType,
    Func<Object> modelAccessor,
    Type modelType,
    string propertyName
)
public:
ModelMetadata(
    ModelMetadataProvider^ provider, 
    Type^ containerType, 
    Func<Object^>^ modelAccessor, 
    Type^ modelType, 
    String^ propertyName
)
new : 
        provider:ModelMetadataProvider * 
        containerType:Type * 
        modelAccessor:Func<Object> * 
        modelType:Type * 
        propertyName:string -> ModelMetadata
public function ModelMetadata(
    provider : ModelMetadataProvider, 
    containerType : Type, 
    modelAccessor : Func<Object>, 
    modelType : Type, 
    propertyName : String
)

Parameters

  • containerType
    Type: System.Type

    The type of the container.

See Also

Reference

ModelMetadata Class

System.Web.Http.Metadata Namespace