Ejemplo n.º 1
0
        public bool TryAddUser(string user, out string error)
        {
            error = "";
            if (string.IsNullOrEmpty(user))
            {
                error = "Supplied username was empty";
                return(false);
            }
            VoteUser usr = new VoteUser {
                Username = user
            };

            if (!_users.ContainsKey(usr))
            {
                _users.Add(usr, DateTime.Now);
            }
            return(true);
        }
Ejemplo n.º 2
0
 public VoteUser(VoteUser other) : this()
 {
     Username = other.Username;
 }