示例#1
0
 public User GetOrCreateUserFromHidden(string hiddenUserId)
 {
     var user = Users.FirstOrDefault(x => x.HiddenId == hiddenUserId) ?? Users.Local.FirstOrDefault(x => x.HiddenId == hiddenUserId);
     if (user == null)
     {
         user = new User() { HiddenId = hiddenUserId };
         Users.Add(user);
     }
     return user;
 }
示例#2
0
 public User GetOrCreateUser(string lotroId, string hiddenId, string name)
 {
     var user = Users.FirstOrDefault(x => x.HiddenId == hiddenId) ?? Users.Local.FirstOrDefault(x => x.HiddenId == hiddenId);
     if (user == null)
     {
         user = new User() { Name = name, LotroId = lotroId, HiddenId = hiddenId };
         Users.Add(user);
     }
     return user;
 }