示例#1
0
        public bool IsUserLoggedIn(User user)
        {
            CheckTimeoutSessions();

            foreach (var value in loggedUsers.Values)
            {
                if (user.Equals(value.User))
                    return true;
            }
            return false;
        }
示例#2
0
 public List<Repository> GetRepositories(User owner)
 {
     return repositoryManager.GetRepositories(owner);
 }
示例#3
0
文件: Session.cs 项目: Gvin/Diplom
 public Session(User user)
 {
     this.user = user;
     created = DateTime.Now;
 }
示例#4
0
 public Guid AddUser(User user)
 {
     var guid = Guid.NewGuid();
     loggedUsers.Add(guid, new Session(user));
     return guid;
 }