Пример #1
0
 //Constructor for guests only - can accept only registration requests
 public Session(string userName, int forumId, string forumName)
 {
     this.userName  = userName;
     this.forumId   = forumId;
     this.forumName = forumName;
     actions        = new List <ActionInfo>();
     AddAction(ForumLogger.TYPE_INFO, "Guest is trying to register with userName " + userName + " to forum " + forumName);
     logger = ForumLogger.GetInstance();
 }
Пример #2
0
 private BridgeReal()
 {
     _logger = ForumLogger.GetInstance();
     _logger.Write(ForumLogger.TYPE_INFO, "Initializing Driver");
     UM = UserManager.Instance;
     _logger.Write(ForumLogger.TYPE_INFO, "User Manager initialized successfully");
     FM = ForumManager.getInstance();
     _logger.Write(ForumLogger.TYPE_INFO, "Forum Manager initialized successfully");
     MM = MessageManager.Instance();
     _logger.Write(ForumLogger.TYPE_INFO, "Message Manager initialized successfully");
     _logger.Write(ForumLogger.TYPE_INFO, "Initializing Data");
     initializingDemoRunData();
     _logger.Write(ForumLogger.TYPE_INFO, "Data initialized successfully");
 }
Пример #3
0
 public Session(int userId, string userName, int forumId, string forumName, SessionReason sr)
 {
     startTime      = DateTime.Now;
     this.userId    = userId;
     this.userName  = userName;
     this.forumId   = forumId;
     this.forumName = forumName;
     actions        = new List <ActionInfo>();
     if (sr == SessionReason.loggin)
     {
         AddAction(ForumLogger.TYPE_INFO, "User " + userName + " logged to forum " + forumName);
     }
     else
     if (sr == SessionReason.registration)
     {
         AddAction(ForumLogger.TYPE_INFO, "User " + userName + " registered to forum " + forumName);
     }
     logger = ForumLogger.GetInstance();
 }