Interface ISessionStorage
Represents the session storage for the site currently opened in the browser. Each site has its own separate storage area.
public interface ISessionStorage
Properties
Count
Gets the number of items in session storage.
int Count { get; }
Property Value
Methods
Clear()
Clears local storage.
void Clear()
GetItem(string)
Returns value of the session storage given a key.
string GetItem(string key)
Parameters
key
stringkey to for a session storage entry
Returns
KeySet()
Returns the set of keys associated with session storage.
ReadOnlyCollection<string> KeySet()
Returns
- ReadOnlyCollection<string>
Returns the set of keys associated with session storage as HashSet<T>.
RemoveItem(string)
Removes key/value pair from session storage.
string RemoveItem(string key)
Parameters
key
stringkey to remove from storage
Returns
SetItem(string, string)
Adds key/value pair to session storage.
void SetItem(string key, string value)