Exemplo n.º 1
0
 /// <summary>
 /// Private constructor to insure that Controller is not created outside this class.
 /// </summary>
 private Controller()
 {
     session = Session.GetInstance();
     session.UserID = -1;
 }
Exemplo n.º 2
0
 /// <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;
 }