Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
CachedModelMetadata(TPrototypeCache) Class
Collapse the table of content
Expand the table of content

CachedModelMetadata<'TPrototypeCache> Class

 

Provides a container for cached metadata.

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

System.Object
  System.Web.Mvc.ModelMetadata
    System.Web.Mvc.CachedModelMetadata<'TPrototypeCache>
      System.Web.Mvc.CachedDataAnnotationsModelMetadata

[<AbstractClass>]
type CachedModelMetadata<'TPrototypeCache> = 
    class
        inherit ModelMetadata
    end

Type Parameters

TPrototypeCache

he type of the container.

NameDescription
System_CAPS_protmethodCachedModelMetadata<'TPrototypeCache>(CachedDataAnnotationsModelMetadataProvider, Type, Type, String, 'TPrototypeCache)

Constructor for creating real instances of the metadata class based on a prototype.

System_CAPS_protmethodCachedModelMetadata<'TPrototypeCache>(CachedModelMetadata<'TPrototypeCache>, Func<Object>)

Constructor for creating the prototype instances of the metadata class.

NameDescription
System_CAPS_pubpropertyAdditionalValues

Gets a dictionary that contains additional metadata about the model.(Inherited from ModelMetadata.)

System_CAPS_pubpropertyContainer

A reference to the model's container object. Will be non-null if the model represents a property.(Inherited from ModelMetadata.)

System_CAPS_pubpropertyContainerType

Gets or sets the type of the container for the model.(Inherited from ModelMetadata.)

System_CAPS_pubpropertyConvertEmptyStringToNull

Gets or sets a cached value that indicates whether empty strings that are posted back in forms should be converted to null.(Overrides ModelMetadata.ConvertEmptyStringToNull.)

System_CAPS_pubpropertyDataTypeName

Gets or sets meta information about the data type.(Overrides ModelMetadata.DataTypeName.)

System_CAPS_pubpropertyDescription

Gets or sets the description of the model.(Overrides ModelMetadata.Description.)

System_CAPS_pubpropertyDisplayFormatString

Gets or sets the display format string for the model.(Overrides ModelMetadata.DisplayFormatString.)

System_CAPS_pubpropertyDisplayName

Gets or sets the display name of the model.(Overrides ModelMetadata.DisplayName.)

System_CAPS_pubpropertyEditFormatString

Gets or sets the edit format string of the model.(Overrides ModelMetadata.EditFormatString.)

System_CAPS_pubpropertyHideSurroundingHtml

Gets or sets a value that indicates whether the model object should be rendered using associated HTML elements.(Overrides ModelMetadata.HideSurroundingHtml.)

System_CAPS_pubpropertyHtmlEncode
System_CAPS_pubpropertyIsComplexType

Gets or sets a value that indicates whether the model is a complex type.(Inherited from ModelMetadata.)

System_CAPS_pubpropertyIsNullableValueType

Gets a value that indicates whether the type is nullable.(Inherited from ModelMetadata.)

System_CAPS_pubpropertyIsReadOnly

Gets or sets a value that indicates whether the model is read-only.(Overrides ModelMetadata.IsReadOnly.)

System_CAPS_pubpropertyIsRequired

Gets or sets a value that indicates whether the model is required.(Overrides ModelMetadata.IsRequired.)

System_CAPS_pubpropertyModel

Gets the value of the model.(Inherited from ModelMetadata.)

System_CAPS_pubpropertyModelType

Gets the type of the model.(Inherited from ModelMetadata.)

System_CAPS_pubpropertyNullDisplayText

Gets or sets the string to display for null values.(Overrides ModelMetadata.NullDisplayText.)

System_CAPS_pubpropertyOrder

Gets or sets a value that represents order of the current metadata.(Overrides ModelMetadata.Order.)

System_CAPS_pubpropertyProperties

Gets a collection of model metadata objects that describe the properties of the model.(Inherited from ModelMetadata.)

System_CAPS_pubpropertyPropertyName

Gets the property name.(Inherited from ModelMetadata.)

System_CAPS_protpropertyPrototypeCache

Gets or sets the prototype cache.

System_CAPS_protpropertyProvider

Gets or sets the provider.(Inherited from ModelMetadata.)

System_CAPS_pubpropertyRequestValidationEnabled

Gets or sets a value that indicates whether request validation is enabled.(Inherited from ModelMetadata.)

System_CAPS_pubpropertyShortDisplayName

Gets or sets a short display name.(Overrides ModelMetadata.ShortDisplayName.)

System_CAPS_pubpropertyShowForDisplay

Gets or sets a value that indicates whether the property should be displayed in read-only views such as list and detail views.(Overrides ModelMetadata.ShowForDisplay.)

System_CAPS_pubpropertyShowForEdit

Gets or sets a value that indicates whether the model should be displayed in editable views.(Overrides ModelMetadata.ShowForEdit.)

System_CAPS_pubpropertySimpleDisplayText

Gets or sets the simple display string for the model.(Overrides ModelMetadata.SimpleDisplayText.)

System_CAPS_pubpropertyTemplateHint

Gets or sets a hint that suggests what template to use for this model.(Overrides ModelMetadata.TemplateHint.)

System_CAPS_pubpropertyWatermark

Gets or sets a value that can be used as a watermark.(Overrides ModelMetadata.Watermark.)

NameDescription
System_CAPS_protmethodComputeConvertEmptyStringToNull()

This method is protected and therefore cannot be called directly. This method was designed to be overridden in a deriving class such as CachedDataAnnotationsModelMetadata.

Gets or sets a cached value that indicates whether empty strings that are posted back in forms should be converted to null.

System_CAPS_protmethodComputeDataTypeName()

This method is protected and therefore cannot be called directly. This method was designed to be overridden in a deriving class such as CachedDataAnnotationsModelMetadata.

Gets or sets meta information about the data type.

System_CAPS_protmethodComputeDescription()

This method is protected and therefore cannot be called directly. This method was designed to be overridden in a deriving class such as CachedDataAnnotationsModelMetadata.

Gets or sets the description of the model.

System_CAPS_protmethodComputeDisplayFormatString()

This method is protected and therefore cannot be called directly. This method was designed to be overridden in a deriving class such as CachedDataAnnotationsModelMetadata.

Gets or sets the display format string for the model.

System_CAPS_protmethodComputeDisplayName()

This method is protected and therefore cannot be called directly. This method was designed to be overridden in a deriving class such as CachedDataAnnotationsModelMetadata.

Gets or sets the display name of the model.

System_CAPS_protmethodComputeEditFormatString()

This method is protected and therefore cannot be called directly. This method was designed to be overridden in a deriving class such as CachedDataAnnotationsModelMetadata.

Gets or sets the edit format string of the model.

System_CAPS_protmethodComputeHasNonDefaultEditFormat()

This method is protected and therefore cannot be called directly. This method was designed to be overridden in a deriving class such as CachedDataAnnotationsModelMetadata.

System_CAPS_protmethodComputeHideSurroundingHtml()

This method is protected and therefore cannot be called directly. This method was designed to be overridden in a deriving class such as CachedDataAnnotationsModelMetadata.

Gets or sets a cached value that indicates whether the model object should be rendered using associated HTML elements.

System_CAPS_protmethodComputeHtmlEncode()

System_CAPS_protmethodComputeIsReadOnly()

This method is protected and therefore cannot be called directly. This method was designed to be overridden in a deriving class such as CachedDataAnnotationsModelMetadata.

Gets or sets a cached value that indicates whether the model is read-only.

System_CAPS_protmethodComputeIsRequired()

This method is protected and therefore cannot be called directly. This method was designed to be overridden in a deriving class such as CachedDataAnnotationsModelMetadata.

Gets or sets a cached value that indicates whether the model is required.

System_CAPS_protmethodComputeNullDisplayText()

This method is protected and therefore cannot be called directly. This method was designed to be overridden in a deriving class such as CachedDataAnnotationsModelMetadata.

Gets or sets the cached string to display for null values.

System_CAPS_protmethodComputeOrder()

This method is protected and therefore cannot be called directly. This method was designed to be overridden in a deriving class such as CachedDataAnnotationsModelMetadata.

Gets or sets a cached value that represents order of the current metadata.

System_CAPS_protmethodComputeShortDisplayName()

This method is protected and therefore cannot be called directly. This method was designed to be overridden in a deriving class such as CachedDataAnnotationsModelMetadata.

Gets or sets a short display name.

System_CAPS_protmethodComputeShowForDisplay()

This method is protected and therefore cannot be called directly. This method was designed to be overridden in a deriving class such as CachedDataAnnotationsModelMetadata.

Gets or sets a cached value that indicates whether the property should be displayed in read-only views such as list and detail views.

System_CAPS_protmethodComputeShowForEdit()

This method is protected and therefore cannot be called directly. This method was designed to be overridden in a deriving class such as CachedDataAnnotationsModelMetadata.

Gets or sets a cached value that indicates whether the model should be displayed in editable views.

System_CAPS_protmethodComputeSimpleDisplayText()

This method is protected and therefore cannot be called directly. This method was designed to be overridden in a deriving class such as CachedDataAnnotationsModelMetadata.

Gets or sets the cached simple display string for the model.

System_CAPS_protmethodComputeTemplateHint()

This method is protected and therefore cannot be called directly. This method was designed to be overridden in a deriving class such as CachedDataAnnotationsModelMetadata.

Gets or sets a cached hint that suggests what template to use for this model.

System_CAPS_protmethodComputeWatermark()

This method is protected and therefore cannot be called directly. This method was designed to be overridden in a deriving class such as CachedDataAnnotationsModelMetadata.

Gets or sets a cached value that can be used as a watermark.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetDisplayName()

Gets the display name for the model.(Inherited from ModelMetadata.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_protmethodGetSimpleDisplayText()

Gets or sets the simple display string for the model.(Overrides ModelMetadata.GetSimpleDisplayText().)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodGetValidators(ControllerContext)

Gets a list of validators for the model.(Inherited from ModelMetadata.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

This class assumes that model metadata is expensive to create, and allows the user to stash a cache object that can be copied around as a prototype to make creation and computation quicker. It delegates the retrieval of values to getter methods, the results of which are cached on a per metadata instance basis. This allows flexible caching strategies: either caching the source of information across instances or caching of the actual information itself, depending on what the developer decides to put into the prototype cache.

The ComputeXyz methods in CachedModelMetadata<'TPrototypeCache> are designed to be overridden in a deriving class such as CachedDataAnnotationsModelMetadata. The methods ComputeXyz are protected, they can’t be called directly.

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

Return to top
Show:
© 2015 Microsoft