using System; using System.Web; /**////-------------------------------------------------------------------- /// Developed by M. van Eijkel - aug 2005 /// [e]: marcelvaneijkel@gmail.com /// [w]: www.vaneijkel.com namespace VanEijkel.Web { /**//// <summary> /// Wrapper class for the session object. /// It centralizes the logic for retrieving and validation of session information. /// By using an approach like this you improve the protection and encapsulation of existing code. /// It offers a simple, low-risk, easy manageable way to improve existing WebApplication. /// Therfore, I call it webRefactoring. /// </summary> public class CurrentSession { Constants#region Constants private const String sMANDATORY_SESSION_KEY_NOT_FOUND_MSG = "Session variable excepted but does not exist. Key={0}"; private const String sMANDATORY_SESSION_VALUE_INVALID_NULL = "None null session value excepted. Key={0}"; private const Int32 nUSERID_UNKOWN = -1; private const Int32 nUSERID_MINIMUM = 1; private const String sUSERID_INVALID = "Invalid UserID:{0}. UserID should be larger than:{1}"; #endregion UserID#region UserID