Interface ISession
- Namespace
- Dynamicweb.Environment
- Assembly
- Dynamicweb.Core.dll
Interface ISession is an abstraction of HttpSessionState. Provides access to session-state values as well as session-level settings and lifetime management methods.
public interface ISession
Properties
this[string]
Gets or sets the session value with the specified key.
object? this[string key] { get; set; }
Parameters
key
stringThe key.
Property Value
- object
System.Object.
Keys
Gets the session keys.
NameObjectCollectionBase.KeysCollection Keys { get; }
Property Value
- NameObjectCollectionBase.KeysCollection
A collection of keys.
SessionID
Gets the session id.
string SessionID { get; }
Property Value
- string
The session id.
Methods
Abandon()
Abandons this session.
void Abandon()
Add(string, object)
Adds a session value.
void Add(string name, object value)
Parameters
Remove(string)
Removes the session value with the specified key.
void Remove(string key)
Parameters
key
stringThe key.
RemoveAll()
Removes all session values.
void RemoveAll()