Szerkesztés

Megosztás a következőn keresztül:


DataAnnotationsModelMetadata Class

Definition

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

public ref class DataAnnotationsModelMetadata : System::Web::ModelBinding::ModelMetadata
public class DataAnnotationsModelMetadata : System.Web.ModelBinding.ModelMetadata
type DataAnnotationsModelMetadata = class
    inherit ModelMetadata
Public Class DataAnnotationsModelMetadata
Inherits ModelMetadata
Inheritance
DataAnnotationsModelMetadata

Constructors

DataAnnotationsModelMetadata(DataAnnotationsModelMetadataProvider, Type, Func<Object>, Type, String, DisplayColumnAttribute)

Initializes a new instance of the DataAnnotationsModelMetadata class.

Fields

DefaultOrder

An integer value that is always set to 10000.

(Inherited from ModelMetadata)

Properties

AdditionalValues

Gets a collection that contains additional metadata about the model.

(Inherited from ModelMetadata)
ContainerType

Gets the type of the container.

(Inherited from ModelMetadata)
ConvertEmptyStringToNull

Gets or sets a value that determines whether empty strings that are submitted in forms should be converted to null.

(Inherited from ModelMetadata)
DataTypeName

Gets or sets the name of the data type.

(Inherited from ModelMetadata)
Description

Gets or sets text that describes the model.

(Inherited from ModelMetadata)
DisplayFormatString

Gets 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)
DisplayName

Gets or sets the text to use in UI when the name of the model is displayed.

(Inherited from ModelMetadata)
EditFormatString

Gets or sets the format string to use in UI in edit mode.

(Inherited from ModelMetadata)
HideSurroundingHtml

Gets or sets a value that determines whether surrounding HTML should be hidden.

(Inherited from ModelMetadata)
IsComplexType

Gets a value that specifies whether the model is a complex type.

(Inherited from ModelMetadata)
IsNullableValueType

Gets a value that specifies whether the model is a nullable value type.

(Inherited from ModelMetadata)
IsReadOnly

Gets or sets a value that specifies whether the model can be updated.

(Inherited from ModelMetadata)
IsRequired

Gets or sets a value that specifies whether the property is required.

(Inherited from ModelMetadata)
Model

Gets or sets the model object.

(Inherited from ModelMetadata)
ModelType

Gets the type of the model.

(Inherited from ModelMetadata)
NullDisplayText

Gets the string that should be displayed when the model is null.

(Inherited from ModelMetadata)
Order

Gets or sets an integer that indicates the order in which to display this property relative to other properties.

(Inherited from ModelMetadata)
Properties

Gets a collection of model metadata objects that describe the properties of the model.

(Inherited from ModelMetadata)
PropertyName

Gets the name of the property.

(Inherited from ModelMetadata)
Provider

Gets or sets the provider object for this metadata.

(Inherited from ModelMetadata)
RequestValidationEnabled

Gets or sets a value that specifies whether request validation is enabled.

(Inherited from ModelMetadata)
ShortDisplayName

Gets or sets a short version of the display name.

(Inherited from ModelMetadata)
ShowForDisplay

Gets 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)
ShowForEdit

Gets or sets a value that specifies whether the property should be displayed in edit mode (as opposed to display mode).

(Inherited from ModelMetadata)
SimpleDisplayText

Gets or sets text to display for the model when the model represents a complex object.

(Inherited from ModelMetadata)
TemplateHint

Gets or sets a value that indicates what template (data control) should be used in UI for the model.

(Inherited from ModelMetadata)
Watermark

Gets or sets watermark text for a text box.

(Inherited from ModelMetadata)

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetDisplayName()

Returns text to display as the name of the model in UI.

(Inherited from ModelMetadata)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetSimpleDisplayText()

Returns text to display for the model when the model represents a complex object.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetValidators(ModelBindingExecutionContext)

Returns a collection of validators that apply to the model.

(Inherited from ModelMetadata)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to