Jaxcent can (optionally) maintain a "session" (similar to the System.Web.SessionState.WebSessionState that is accessible from "Session" from the HttpContext in ASPX programming.) It is not the same session as ASPX, but does provide some similar features, and can be used in the same way. It is available from JaxcentPage, and is not deleted (except it can be programmatically deleted) as long as the browser is visiting and staying on one or more pages containing the session. When the browser is gone from all such pages, timeout starts, and upon expiry of the timeout, the session is deleted. Default timeout is 5 minutes.

To enable the session, "use-session" must be specified as true for the page, otherwise the session will be null. Session is established at page-load.

Objects can be stored and retrieved from the session on string keys.

The session is not synchronized, if there is a possibility of using the session from multiple threads, access should be synchronized.

Namespace: Jaxcent.Web
Assembly: Jaxcent (in Jaxcent.dll) Version: 2.3.1.0 (2.3.1.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public class JaxcentSession : Dictionary<string, Object>
Public Class JaxcentSession _
	Inherits Dictionary(Of String, Object)
public ref class JaxcentSession : public Dictionary<String^, Object^>

Members

            
 All Members  Fields   Properties   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
Add(TKey, TValue)
Adds the specified key and value to the dictionary.
(Inherited from Dictionary<(Of <(<'String, Object>)>)>.)
Clear()()()()
Removes all keys and values from the Dictionary<(Of <(<'TKey, TValue>)>)>.
(Inherited from Dictionary<(Of <(<'String, Object>)>)>.)
Comparer
Gets the IEqualityComparer<(Of <(<'T>)>)> that is used to determine equality of keys for the dictionary.
(Inherited from Dictionary<(Of <(<'String, Object>)>)>.)
ContainsKey(TKey)
Determines whether the Dictionary<(Of <(<'TKey, TValue>)>)> contains the specified key.
(Inherited from Dictionary<(Of <(<'String, Object>)>)>.)
ContainsValue(TValue)
Determines whether the Dictionary<(Of <(<'TKey, TValue>)>)> contains a specific value.
(Inherited from Dictionary<(Of <(<'String, Object>)>)>.)
Count
Gets the number of key/value pairs contained in the Dictionary<(Of <(<'TKey, TValue>)>)>.
(Inherited from Dictionary<(Of <(<'String, Object>)>)>.)
DefaultTimeout
The default Timeout for new sessions, in minutes. Initially, set to 5 minutes. Note that timeout doesn't start as long as user stays on a page with the session. It only starts when user leaves a page containing the session, and if the user proceeds to another page with the session, the timeout is again stopped.
Delete()()()()
Remove this session. Note that if a page with "use-session" is accessed again, a fresh new session will be created.
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
GetEnumerator()()()()
Returns an enumerator that iterates through the Dictionary<(Of <(<'TKey, TValue>)>)>.
(Inherited from Dictionary<(Of <(<'String, Object>)>)>.)
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetObjectData(SerializationInfo, StreamingContext)
Implements the ISerializable interface and returns the data needed to serialize the Dictionary<(Of <(<'TKey, TValue>)>)> instance.
(Inherited from Dictionary<(Of <(<'String, Object>)>)>.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
Item[([( TKey])])
Gets or sets the value associated with the specified key.
(Inherited from Dictionary<(Of <(<'String, Object>)>)>.)
Keys
Gets a collection containing the keys in the Dictionary<(Of <(<'TKey, TValue>)>)>.
(Inherited from Dictionary<(Of <(<'String, Object>)>)>.)
MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
OnDeserialization(Object)
Implements the ISerializable interface and raises the deserialization event when the deserialization is complete.
(Inherited from Dictionary<(Of <(<'String, Object>)>)>.)
Remove(TKey)
Removes the value with the specified key from the Dictionary<(Of <(<'TKey, TValue>)>)>.
(Inherited from Dictionary<(Of <(<'String, Object>)>)>.)
RemoveContentURLData()()()()
If you have used JaxcentPage.MakeContentURL, the data content is stored in the Jaxcent session. When done with the data, this method can be called to actively dispose of all such data (otherwise it will be disposed when the session is deleted.)
Timeout
The timeout for this session, in minutes. If the browser stays away for the session pages for this many minutes, the session is deleted. Initialized to DefaultTimeout. Timeout doesn't start as long as the browser is on one or more of the pages containing this session.
ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
TryGetValue(TKey, TValue%)
Gets the value associated with the specified key.
(Inherited from Dictionary<(Of <(<'String, Object>)>)>.)
Values
Gets a collection containing the values in the Dictionary<(Of <(<'TKey, TValue>)>)>.
(Inherited from Dictionary<(Of <(<'String, Object>)>)>.)

Inheritance Hierarchy

System..::..Object
  System.Collections.Generic..::..Dictionary<(Of <(<'String, Object>)>)>
    Jaxcent.Web..::..JaxcentSession

See Also