Files
mono/mcs/class/System.Web/System.Web.SessionState/StateServerItem.cs
T
Jackson Harper 6d33b34794 * RemoteStateServer.cs: Update the session dictionary data and the
static objects data.
	* SessionDictionary.cs: Remove type serialization methods, these
	have been moved to a utility class. Add convenience methods for
	converting to/from byte arrays.
	* SessionSQLServerHandler.cs:
	* SessionStateServerHandler.cs: Save/Restore static objects. Use new
	to/from byte array methods.
	* StateServerItem.cs: Hold static objects data.

svn path=/trunk/mcs/; revision=20439
2003-11-25 21:43:29 +00:00

53 lines
985 B
C#

//
// System.Web.SessionState.StateServerItem
//
// Author(s):
// Jackson Harper ([email protected])
//
// (C) 2003 Novell, Inc (http://www.novell.com)
//
using System;
namespace System.Web.SessionState {
[Serializable]
public class StateServerItem {
private byte [] dict_data;
private byte [] sobjs_data;
private DateTime last_access;
private int timeout;
public StateServerItem (byte [] dict_data, byte [] sobjs_data, int timeout)
{
this.dict_data = dict_data;
this.sobjs_data = sobjs_data;
this.timeout = timeout;
this.last_access = DateTime.Now;
}
public byte [] DictionaryData {
get { return dict_data; }
set { dict_data = value; }
}
public byte [] StaticObjectsData {
get { return sobjs_data; }
set { sobjs_data = value; }
}
public void Touch ()
{
last_access = DateTime.Now;
}
public bool IsAbandoned () {
if (last_access.AddMinutes (timeout) < DateTime.Now)
return true;
return false;
}
}
}