Class DataAnnotationsModelMetadata
Provides a container for common metadata, for the DataAnnotationsModelMetadataProvider class, and for the DataAnnotationsModelValidator class for a data model.
public class DataAnnotationsModelMetadata : ModelMetadata
- Inheritance
-
DataAnnotationsModelMetadata
- Inherited Members
Constructors
DataAnnotationsModelMetadata(DataAnnotationsModelMetadataProvider, Type, Func<object>, Type, string, DisplayColumnAttribute)
Initializes a new instance of the DataAnnotationsModelMetadataProvider class.
public DataAnnotationsModelMetadata(DataAnnotationsModelMetadataProvider provider, Type containerType, Func<object> modelAccessor, Type modelType, string propertyName, DisplayColumnAttribute displayColumnAttribute)
Parameters
provider
DataAnnotationsModelMetadataProviderThe data-annotations model metadata provider.
containerType
TypeThe type of the container.
modelAccessor
Func<object>The model accessor.
modelType
TypeThe type of the model.
propertyName
stringThe name of the property.
displayColumnAttribute
DisplayColumnAttributeThe display column attribute.
Methods
GetSimpleDisplayText()
Returns simple text for the model data.
protected override string GetSimpleDisplayText()
Returns
- string
Simple text for the model data.