Table of Contents

Interface ISession

Namespace
Dynamicweb.Environment
Assembly
Dynamicweb.Environment.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 string
The 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

name string
The name.
value object
The value.

GetSnapshot()

Gets a Snapshot of the current session state.
Snapshot GetSnapshot()

Returns

Snapshot
Snapshot.

Remove(string)

Removes the session value with the specified key.
void Remove(string key)

Parameters

key string
The key.

RemoveAll()

Removes all session values.
void RemoveAll()
To top