Edit

Share via


ModelMetadata Constructor

Definition

Initializes a new instance of the ModelMetadata class.

C#
public ModelMetadata(System.Web.ModelBinding.ModelMetadataProvider provider, Type containerType, Func<object> modelAccessor, Type modelType, string propertyName);

Parameters

provider
ModelMetadataProvider

The provider object.

containerType
Type

The type of the container, or null to create metadata for the model type.

modelAccessor
Func<Object>

The model accessor.

modelType
Type

The type of the model.

propertyName
String

The name of the property, or null to create metadata for the model type.

Applies to

Product Versions
.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1