ViewDataDictionary<TModel> Class

Definition

Represents a ViewDataDictionary for a specific model type.

generic <typename TModel>
public ref class ViewDataDictionary : Microsoft::AspNetCore::Mvc::ViewFeatures::ViewDataDictionary
public class ViewDataDictionary<TModel> : Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary
type ViewDataDictionary<'Model> = class
    inherit ViewDataDictionary
Public Class ViewDataDictionary(Of TModel)
Inherits ViewDataDictionary

Type Parameters

TModel

The type of the model.

Inheritance
ViewDataDictionary<TModel>

Constructors

ViewDataDictionary<TModel>(IModelMetadataProvider, ModelStateDictionary)

Initializes a new instance of the ViewDataDictionary<TModel> class.

ViewDataDictionary<TModel>(ViewDataDictionary)

Initializes a new instance of the ViewDataDictionary<TModel> class based in part on an existing ViewDataDictionary instance.

ViewDataDictionary<TModel>(ViewDataDictionary, Object)

Initializes a new instance of the ViewDataDictionary<TModel> class based in part on an existing ViewDataDictionary instance. This constructor is careful to avoid exceptions SetModel(Object) may throw when model is null.

Properties

Count (Inherited from ViewDataDictionary)
IsReadOnly (Inherited from ViewDataDictionary)
Item[String] (Inherited from ViewDataDictionary)
Keys (Inherited from ViewDataDictionary)
Model

Gets or sets the current model.

ModelExplorer

Gets or sets the ModelExplorer for the Model.

(Inherited from ViewDataDictionary)
ModelMetadata

Gets the ModelMetadata for an expression, the Model (if non-null), or the declared Type.

(Inherited from ViewDataDictionary)
ModelState

Gets the ModelStateDictionary.

(Inherited from ViewDataDictionary)
TemplateInfo

Gets the TemplateInfo.

(Inherited from ViewDataDictionary)
Values (Inherited from ViewDataDictionary)

Methods

Add(KeyValuePair<String,Object>) (Inherited from ViewDataDictionary)
Add(String, Object) (Inherited from ViewDataDictionary)
Clear() (Inherited from ViewDataDictionary)
Contains(KeyValuePair<String,Object>) (Inherited from ViewDataDictionary)
ContainsKey(String) (Inherited from ViewDataDictionary)
CopyTo(KeyValuePair<String,Object>[], Int32) (Inherited from ViewDataDictionary)
Eval(String)

Gets value of named expression in this ViewDataDictionary.

(Inherited from ViewDataDictionary)
Eval(String, String)

Gets value of named expression in this ViewDataDictionary, formatted using given format.

(Inherited from ViewDataDictionary)
GetViewDataInfo(String)

Gets ViewDataInfo for named expression in this ViewDataDictionary.

(Inherited from ViewDataDictionary)
Remove(KeyValuePair<String,Object>) (Inherited from ViewDataDictionary)
Remove(String) (Inherited from ViewDataDictionary)
SetModel(Object)

Set ModelExplorer to ensure Model and Model reflect the new value.

(Inherited from ViewDataDictionary)
TryGetValue(String, Object) (Inherited from ViewDataDictionary)

Explicit Interface Implementations

IEnumerable.GetEnumerator() (Inherited from ViewDataDictionary)
IEnumerable<KeyValuePair<String,Object>>.GetEnumerator() (Inherited from ViewDataDictionary)

Applies to