CachedDataAnnotationsModelMetadata 類別

定義

提供容器來快取 DataAnnotationsModelMetadata

public class CachedDataAnnotationsModelMetadata : System.Web.Mvc.CachedModelMetadata<System.Web.Mvc.CachedDataAnnotationsMetadataAttributes>
type CachedDataAnnotationsModelMetadata = class
    inherit CachedModelMetadata<CachedDataAnnotationsMetadataAttributes>
Public Class CachedDataAnnotationsModelMetadata
Inherits CachedModelMetadata(Of CachedDataAnnotationsMetadataAttributes)
繼承

建構函式

CachedDataAnnotationsModelMetadata(CachedDataAnnotationsModelMetadata, Func<Object>)

使用原型和模型存取子, CachedDataAnnotationsModelMetadata 初始化 類別的新實例。

CachedDataAnnotationsModelMetadata(CachedDataAnnotationsModelMetadataProvider, Type, Type, String, IEnumerable<Attribute>)

使用提供者、容器類型、模型類型、屬性名稱和屬性,初始化 類別的新實例 CachedDataAnnotationsModelMetadata

欄位

DefaultOrder

預設順序值,也就是 10000。

(繼承來源 ModelMetadata)

屬性

AdditionalValues

取得字典,其中包含模型的其他中繼資料。

(繼承來源 ModelMetadata)
Container

參照模型的容器物件。 如果模型表示屬性,則將為非 null。

(繼承來源 ModelMetadata)
ContainerType

取得或設定模型的容器類型。

(繼承來源 ModelMetadata)
ConvertEmptyStringToNull

取得或設定快取值,這個值表示是否應該將表單中回傳的空字串轉換成 null。

(繼承來源 CachedModelMetadata<TPrototypeCache>)
DataTypeName

取得或設定資料型別的中繼資訊。

(繼承來源 CachedModelMetadata<TPrototypeCache>)
Description

取得或設定模型的描述。

(繼承來源 CachedModelMetadata<TPrototypeCache>)
DisplayFormatString

取得或設定模型的顯示格式字串。

(繼承來源 CachedModelMetadata<TPrototypeCache>)
DisplayName

取得或設定模型的顯示名稱。

(繼承來源 CachedModelMetadata<TPrototypeCache>)
EditFormatString

取得或設定模型的編輯格式字串。

(繼承來源 CachedModelMetadata<TPrototypeCache>)
HideSurroundingHtml

取得或設定值,這個值表示模型物件是否應該使用相關 HTML 項目來呈現。

(繼承來源 CachedModelMetadata<TPrototypeCache>)
HtmlEncode

提供容器來快取 DataAnnotationsModelMetadata

(繼承來源 CachedModelMetadata<TPrototypeCache>)
IsComplexType

取得或設定值,這個值表示模型是否為複雜類型。

(繼承來源 ModelMetadata)
IsNullableValueType

取得值,指出類型是否可為 Null。

(繼承來源 ModelMetadata)
IsReadOnly

取得或設定值,這個值表示模型是否為唯讀。

(繼承來源 CachedModelMetadata<TPrototypeCache>)
IsRequired

取得或設定值,這個值表示是否需要模型。

(繼承來源 CachedModelMetadata<TPrototypeCache>)
Model

取得模型的值。

(繼承來源 ModelMetadata)
ModelType

取得模型的型別。

(繼承來源 ModelMetadata)
NullDisplayText

取得或設定要針對 Null 值顯示的字串。

(繼承來源 CachedModelMetadata<TPrototypeCache>)
Order

取得或設定值,這個值代表目前中繼資料的順序。

(繼承來源 CachedModelMetadata<TPrototypeCache>)
Properties

取得模型中繼資料物件的集合,這類物件描述模型的屬性。

(繼承來源 ModelMetadata)
PropertyName

取得屬性名稱。

(繼承來源 ModelMetadata)
PrototypeCache

取得或設定原型快取。

(繼承來源 CachedModelMetadata<TPrototypeCache>)
Provider

取得或設定提供者。

(繼承來源 ModelMetadata)
RequestValidationEnabled

取得或設定值,這個值表示是否已啟用要求驗證。

(繼承來源 ModelMetadata)
ShortDisplayName

取得或設定簡短顯示名稱。

(繼承來源 CachedModelMetadata<TPrototypeCache>)
ShowForDisplay

取得或設定值,這個值表示是否應該以唯讀檢視來顯示屬性,例如清單和詳細資料檢視。

(繼承來源 CachedModelMetadata<TPrototypeCache>)
ShowForEdit

取得或設定值,表示是否應該以可編輯檢視來顯示模型。

(繼承來源 CachedModelMetadata<TPrototypeCache>)
SimpleDisplayText

取得或設定模型的簡單顯示字串。

(繼承來源 CachedModelMetadata<TPrototypeCache>)
TemplateHint

取得或設定提示,這個提示建議要用於此模型的範本。

(繼承來源 CachedModelMetadata<TPrototypeCache>)
Watermark

取得或設定可以做為浮水印的值。

(繼承來源 CachedModelMetadata<TPrototypeCache>)

方法

ComputeConvertEmptyStringToNull()

取得值,指出表單中回傳的空字串是否應該轉換成 Nothing。如果快取值,則會傳回現金值;否則,值會從模型中繼資料擷取並儲存在快取中。

ComputeDataTypeName()

取得資料類型的相關中繼資訊。如果快取值,則會傳回現金值;否則,值會從模型中繼資料擷取並儲存在快取中。

ComputeDescription()

取得模型的描述。如果快取值,則會傳回現金值;否則,值會從模型中繼資料擷取並儲存在快取中。

ComputeDisplayFormatString()

取得模型的顯示格式字串。如果快取值,則會傳回現金值;否則,值會從模型中繼資料擷取並儲存在快取中。

ComputeDisplayName()

取得模型的顯示名稱。如果快取值,則會傳回現金值;否則,值會從模型中繼資料擷取並儲存在快取中。

ComputeEditFormatString()

取得模型的編輯格式字串。如果快取值,則會傳回現金值;否則,值會從模型中繼資料擷取並儲存在快取中。

ComputeHasNonDefaultEditFormat()

取得一直,該值指出模型是否使用了非預設編輯格式的值。

ComputeHideSurroundingHtml()

取得值,這個值表示是否應該使用相關聯的 HTML 專案來轉譯模型物件。取得值,這個值表示是否應該使用相關聯的 HTML 專案來轉譯模型物件。如果快取值,則會傳回現金值;否則,值會從模型中繼資料擷取並儲存在快取中。

ComputeHtmlEncode()

提供容器來快取 DataAnnotationsModelMetadata

ComputeIsReadOnly()

取得值,這個值表示模型是否為唯讀。如果快取值,則會傳回現金值;否則,值會從模型中繼資料擷取並儲存在快取中。

ComputeIsRequired()

取得值,這個值表示是否需要模型。如果快取值,則會傳回現金值;否則,值會從模型中繼資料擷取並儲存在快取中。

ComputeNullDisplayText()

取得要針對 Null 值顯示的字串。如果快取值,則會傳回現金值;否則,值會從模型中繼資料擷取並儲存在快取中。

ComputeOrder()

取得值,表示目前中繼資料的順序。如果快取值,則會傳回現金值;否則,值會從模型中繼資料擷取並儲存在快取中。

ComputeShortDisplayName()

取得簡短的顯示名稱。如果快取值,則會傳回現金值;否則,值會從模型中繼資料擷取並儲存在快取中。

ComputeShowForDisplay()

取得值,這個值表示屬性是否應該顯示在唯讀檢視中,例如清單和詳細資料檢視。如果快取值,則會傳回現金值;否則,值會從模型中繼資料擷取並儲存在快取中。

ComputeShowForEdit()

取得或設定值,這個值表示模型是否應該顯示在可編輯的檢視中。如果快取值,則會傳回現金值;否則,值會從模型中繼資料擷取並儲存在快取中。

ComputeSimpleDisplayText()

取得模型的簡單顯示字串。如果快取值,則會傳回現金值;否則,值會從模型中繼資料擷取並儲存在快取中。

ComputeTemplateHint()

取得提示,這個提示會建議要用於此模型的範本。如果快取值,則會傳回現金值;否則,值會從模型中繼資料擷取並儲存在快取中。

ComputeWatermark()

取得可用來做為浮水印的值。如果快取值,則會傳回現金值;否則,值會從模型中繼資料擷取並儲存在快取中。

GetDisplayName()

取得模型的顯示名稱。

(繼承來源 ModelMetadata)
GetSimpleDisplayText()

取得或設定模型的簡單顯示字串。

(繼承來源 CachedModelMetadata<TPrototypeCache>)
GetValidators(ControllerContext)

取得模型的驗證程式清單。

(繼承來源 ModelMetadata)

適用於