void UpdatePlayerID(IDataReader reader) { int id; string user = reader.GetString(0); if (!nameCache.TryGetValue(user, out id)) { id = NameConverter.FindIds(user)[0]; nameCache[user] = id; } entry.PlayerID = id; }
void UpdatePlayerID(IDataRecord record) { int id; string user = record.GetString(0); if (!nameCache.TryGetValue(user, out id)) { int[] ids = NameConverter.FindIds(user); if (ids.Length > 0) { nameCache[user] = ids[0]; } else { nameCache[user] = NameConverter.InvalidNameID(user); } } entry.PlayerID = id; }