示例#1
0
        public void Target()
        {
            var user = new ServerUser() {
                Nick = "nickhere"
            };

            Assert.AreEqual("nickhere", user.Nick);
            Assert.AreEqual("nickhere", user.Target);
        }
示例#2
0
        private ServerUser UserOrNew(string nick)
        {
            var existing = users.ContainsKey(nick) ? users[nick] : null;

            if(existing != null) {
                return existing;
            }

            var user = new ServerUser {
                Nick = nick
            };

            return user;
        }