ViewDataDictionary ViewDataDictionary ViewDataDictionary Class

Definition

public class ViewDataDictionary : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,object>>, System.Collections.Generic.IDictionary<string,object>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,object>>
type ViewDataDictionary = class
    interface IDictionary<string, obj>
    interface ICollection<KeyValuePair<string, obj>>
    interface seq<KeyValuePair<string, obj>>
    interface IEnumerable
Public Class ViewDataDictionary
Implements ICollection(Of KeyValuePair(Of String, Object)), IDictionary(Of String, Object), IEnumerable(Of KeyValuePair(Of String, Object))
Inheritance
ViewDataDictionaryViewDataDictionaryViewDataDictionary
Derived
Implements

Constructors

ViewDataDictionary(ViewDataDictionary) ViewDataDictionary(ViewDataDictionary) ViewDataDictionary(ViewDataDictionary)

Initializes a new instance of the ViewDataDictionary class based entirely on an existing instance.

ViewDataDictionary(IModelMetadataProvider, ModelStateDictionary) ViewDataDictionary(IModelMetadataProvider, ModelStateDictionary) ViewDataDictionary(IModelMetadataProvider, ModelStateDictionary)

Initializes a new instance of the ViewDataDictionary class.

ViewDataDictionary(IModelMetadataProvider, Type) ViewDataDictionary(IModelMetadataProvider, Type) ViewDataDictionary(IModelMetadataProvider, Type)

Initializes a new instance of the ViewDataDictionary class.

ViewDataDictionary(ViewDataDictionary, Type) ViewDataDictionary(ViewDataDictionary, Type) ViewDataDictionary(ViewDataDictionary, Type)

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

ViewDataDictionary(IModelMetadataProvider, ModelStateDictionary, Type) ViewDataDictionary(IModelMetadataProvider, ModelStateDictionary, Type) ViewDataDictionary(IModelMetadataProvider, ModelStateDictionary, Type)

Initializes a new instance of the ViewDataDictionary class.

ViewDataDictionary(ViewDataDictionary, Object, Type) ViewDataDictionary(ViewDataDictionary, Object, Type) ViewDataDictionary(ViewDataDictionary, Object, Type)

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

Properties

Count Count Count
IsReadOnly IsReadOnly IsReadOnly
Item[String] Item[String] Item[String]
Keys Keys Keys
Model Model Model

Gets or sets the current model.

ModelExplorer ModelExplorer ModelExplorer

Gets or sets the ModelExplorer for the Model.

ModelMetadata ModelMetadata ModelMetadata

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

ModelState ModelState ModelState

Gets the ModelStateDictionary.

TemplateInfo TemplateInfo TemplateInfo

Gets the TemplateInfo.

Values Values Values

Methods

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

Gets value of named expression in this ViewDataDictionary.

Eval(String, String) Eval(String, String) Eval(String, String)

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

FormatValue(Object, String) FormatValue(Object, String) FormatValue(Object, String)

Formats the given value using given format.

GetViewDataInfo(String) GetViewDataInfo(String) GetViewDataInfo(String)

Gets ViewDataInfo for named expression in this ViewDataDictionary.

Remove(KeyValuePair<String,Object>) Remove(KeyValuePair<String,Object>) Remove(KeyValuePair<String,Object>)
Remove(String) Remove(String) Remove(String)
SetModel(Object) SetModel(Object) SetModel(Object)

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

TryGetValue(String, Object) TryGetValue(String, Object) TryGetValue(String, Object)

Explicit Interface Implementations

IEnumerable<KeyValuePair<String,Object>>.GetEnumerator() IEnumerable<KeyValuePair<String,Object>>.GetEnumerator() IEnumerable<KeyValuePair<String,Object>>.GetEnumerator()
IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

Extension Methods

GetWrapperProvider(IEnumerable<IWrapperProviderFactory>, WrapperProviderContext) GetWrapperProvider(IEnumerable<IWrapperProviderFactory>, WrapperProviderContext) GetWrapperProvider(IEnumerable<IWrapperProviderFactory>, WrapperProviderContext)

Gets an instance of IWrapperProvider for the supplied type.

FirstHtmlSymbolAs(IEnumerable<ISymbol>, HtmlSymbolType) FirstHtmlSymbolAs(IEnumerable<ISymbol>, HtmlSymbolType) FirstHtmlSymbolAs(IEnumerable<ISymbol>, HtmlSymbolType)

Converts the generic IEnumerable<T> to a IEnumerable<T> and finds the first HtmlSymbol with type type.

GetContent(IEnumerable<ISymbol>, SourceLocation) GetContent(IEnumerable<ISymbol>, SourceLocation) GetContent(IEnumerable<ISymbol>, SourceLocation)

Applies to