public PgUser GetPgUser(UserBase userBase) { PgUser user; lock (_userLookup) { if (_userLookup.TryGetValue(userBase._id, out user)) return user; user = new PgUser { Id = userBase._id, Username = userBase.username ?? "unknown", Status = "unknown", }; _userLookup[userBase._id] = user; } LookupUserData(userBase._id); return user; }
public PgUser GetPgUser(string id) { var userBase = new UserBase { _id = id }; return GetPgUser(userBase); }