示例#1
0
        private async Task <bool> CreateUser(long id)
        {
            await Task.Yield();

            var newUser = new PersistedUser {
                Id = (int)id,
                RegisterationData = new RegisterationData {
                    Type = UserType.Guest
                }
            };

            return(users.TryAdd(id, newUser));
        }
示例#2
0
 private void UpdateUser(long id, PersistedUser user)
 {
     users[id] = user;
 }