Files
mono/mcs/class/System.Web/System.Web.SessionState/RemoteStateServer.cs
T
Jackson Harper 04cb1c4ce5 * RemoteStateServer.cs: The state server object that will reside
on the server and store session data and ids.
	* StateServerItem.cs: Container for session data.
	* SessionStateServerHandler.cs: Handler that communicates with the
	StateServer so sessions can be stored out of process.
	* SessionStateModule.cs: Allow state server mode.

svn path=/trunk/mcs/; revision=20411
2003-11-25 03:42:46 +00:00

56 lines
896 B
C#

//
// System.Web.SessionState.RemoteStateServer
//
// Author(s):
// Jackson Harper ([email protected])
//
// (C) 2003 Novell, Inc (http://www.novell.com)
//
using System;
using System.Collections;
namespace System.Web.SessionState {
internal class RemoteStateServer : MarshalByRefObject {
private Hashtable table;
internal RemoteStateServer ()
{
table = new Hashtable ();
}
internal void Insert (string id, StateServerItem item)
{
table.Add (id, item);
}
internal void Update (string id, byte [] data)
{
StateServerItem item = table [id] as StateServerItem;
if (item == null)
return;
item.Data = data;
item.Touch ();
}
internal StateServerItem Get (string id)
{
StateServerItem item = table [id] as StateServerItem;
if (item == null || item.IsAbandoned ())
return null;
item.Touch ();
return item;
}
}
}