Export (0) Print
Expand All

DataAnnotationsModelMetadata Class

.NET Framework 4.5

Provides a container for common metadata, for the DataAnnotationsModelMetadataProvider class, and for the DataAnnotationsModelValidator class for a data model.

System.Object
  System.Web.ModelBinding.ModelMetadata
    System.Web.ModelBinding.DataAnnotationsModelMetadata

Namespace:  System.Web.ModelBinding
Assembly:  System.Web (in System.Web.dll)

public class DataAnnotationsModelMetadata : ModelMetadata

The DataAnnotationsModelMetadata type exposes the following members.

  NameDescription
Public methodDataAnnotationsModelMetadataInitializes a new instance of the DataAnnotationsModelMetadata class.
Top

  NameDescription
Public propertyAdditionalValuesGets a collection that contains additional metadata about the model. (Inherited from ModelMetadata.)
Public propertyContainerTypeGets the type of the container. (Inherited from ModelMetadata.)
Public propertyConvertEmptyStringToNullGets or sets a value that determines whether empty strings that are submitted in forms should be converted to null. (Inherited from ModelMetadata.)
Public propertyDataTypeNameGets or sets the name of the data type. (Inherited from ModelMetadata.)
Public propertyDescriptionGets or sets text that describes the model. (Inherited from ModelMetadata.)
Public propertyDisplayFormatStringGets or sets a format string that should be applied when the model is displayed in display mode (as opposed to in edit mode). (Inherited from ModelMetadata.)
Public propertyDisplayNameGets or sets the text to use in UI when the name of the model is displayed. (Inherited from ModelMetadata.)
Public propertyEditFormatStringGets or sets the format string to use in UI in edit mode. (Inherited from ModelMetadata.)
Public propertyHideSurroundingHtmlGets or sets a value that determines whether surrounding HTML should be hidden. (Inherited from ModelMetadata.)
Public propertyIsComplexTypeGets a value that specifies whether the model is a complex type. (Inherited from ModelMetadata.)
Public propertyIsNullableValueTypeGets a value that specifies whether the model is a nullable value type. (Inherited from ModelMetadata.)
Public propertyIsReadOnlyGets or sets a value that specifies whether the model can be updated. (Inherited from ModelMetadata.)
Public propertyIsRequiredGets or sets a value that specifies whether the property is required. (Inherited from ModelMetadata.)
Public propertyModelGets or sets the model object. (Inherited from ModelMetadata.)
Public propertyModelTypeGets the type of the model. (Inherited from ModelMetadata.)
Public propertyNullDisplayTextGets the string that should be displayed when the model is null. (Inherited from ModelMetadata.)
Public propertyOrderGets or sets an integer that indicates the order in which to display this property relative to other properties. (Inherited from ModelMetadata.)
Public propertyPropertiesGets a collection of model metadata objects that describe the properties of the model. (Inherited from ModelMetadata.)
Public propertyPropertyNameGets the name of the property. (Inherited from ModelMetadata.)
Protected propertyProviderGets or sets the provider object for this metadata. (Inherited from ModelMetadata.)
Public propertyRequestValidationEnabledGets or sets a value that specifies whether request validation is enabled. (Inherited from ModelMetadata.)
Public propertyShortDisplayNameGets or sets a short version of the display name. (Inherited from ModelMetadata.)
Public propertyShowForDisplayGets or sets a value that specifies whether the model should be displayed in the UI in display mode (as opposed to edit mode). (Inherited from ModelMetadata.)
Public propertyShowForEditGets or sets a value that specifies whether the property should be displayed in edit mode (as opposed to display mode). (Inherited from ModelMetadata.)
Public propertySimpleDisplayTextGets or sets text to display for the model when the model represents a complex object (Inherited from ModelMetadata.)
Public propertyTemplateHintGets or sets a value that indicates what template (data control) should be used in UI for the model. (Inherited from ModelMetadata.)
Public propertyWatermarkGets or sets watermark text for a text box. (Inherited from ModelMetadata.)
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetDisplayNameReturns text to display as the name of the model in UI. (Inherited from ModelMetadata.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Protected methodGetSimpleDisplayTextReturns text to display for the model when the model represents a complex object. (Overrides ModelMetadata.GetSimpleDisplayText().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodGetValidatorsReturns a collection of validators that apply to the model. (Inherited from ModelMetadata.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

.NET Framework

Supported in: 4.5.3

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft