Share via


TempDataDictionary Class

Definition

Represents a set of data that persists only from one request to the next.

public class TempDataDictionary : 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 TempDataDictionary = class
    interface IDictionary<string, obj>
    interface ICollection<KeyValuePair<string, obj>>
    interface seq<KeyValuePair<string, obj>>
    interface IEnumerable
Public Class TempDataDictionary
Implements ICollection(Of KeyValuePair(Of String, Object)), IDictionary(Of String, Object), IEnumerable(Of KeyValuePair(Of String, Object))
Inheritance
TempDataDictionary
Implements

Constructors

TempDataDictionary()

Initializes a new instance of the TempDataDictionary class.

Properties

Count

Gets the number of elements in the ICollection<T> object.

Item[String]

Gets or sets the object that has the specified key.

Keys

Gets an ICollection<T> object that contains the keys of elements in the IDictionary<TKey,TValue> object.

Values

Gets the ICollection<T> object that contains the values in the IDictionary<TKey,TValue> object.

Methods

Add(String, Object)

Adds an element that has the specified key and value to the IDictionary<TKey,TValue> object.

Clear()

Removes all items from the ICollection<T> instance.

ContainsKey(String)

Determines whether the IDictionary<TKey,TValue> instance contains an element that has the specified key.

ContainsValue(Object)

Determines whether the dictionary contains the specified value.

GetEnumerator()

Gets the enumerator.

Keep()

Marks all keys in the dictionary for retention.

Keep(String)

Marks the specified key in the dictionary for retention.

Load(ControllerContext, ITempDataProvider)

Loads the specified controller context by using the specified data provider.

Peek(String)

Returns an object that contains the element that is associated with the specified key, without marking the key for deletion.

Remove(String)

Removes the element that has the specified key from the IDictionary<TKey,TValue> object.

Save(ControllerContext, ITempDataProvider)

Saves the specified controller context by using the specified data provider.

TryGetValue(String, Object)

Gets the value of the element that has the specified key.

Explicit Interface Implementations

ICollection<KeyValuePair<String,Object>>.Add(KeyValuePair<String,Object>)
ICollection<KeyValuePair<String,Object>>.Contains(KeyValuePair<String,Object>)
ICollection<KeyValuePair<String,Object>>.CopyTo(KeyValuePair<String,Object>[], Int32)
ICollection<KeyValuePair<String,Object>>.IsReadOnly
ICollection<KeyValuePair<String,Object>>.Remove(KeyValuePair<String,Object>)
IEnumerable.GetEnumerator()

Returns an enumerator that can be used to iterate through a collection.

Applies to