/// <summary> /// Private constructor to insure that Controller is not created outside this class. /// </summary> private Controller() { session = Session.GetInstance(); session.UserID = -1; }
/// <summary> /// Accessor method for accessing the single instance of controller. /// </summary> /// <returns>The only instance of controller</returns> public static Session GetInstance() { if (_instance == null) { _instance = new Session(); } return _instance; }