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

            foreach (var value in loggedUsers.Values)
            {
                if (user.Equals(value.User))
                    return true;
            }
            return false;
        }
Beispiel #2
0
 public List<Repository> GetRepositories(User owner)
 {
     return repositoryManager.GetRepositories(owner);
 }
Beispiel #3
0
 public Session(User user)
 {
     this.user = user;
     created = DateTime.Now;
 }
Beispiel #4
0
 public Guid AddUser(User user)
 {
     var guid = Guid.NewGuid();
     loggedUsers.Add(guid, new Session(user));
     return guid;
 }