Example #1
0
 public static async Task <string> GetSteamNameAsync([CanBeNull] string id)
 {
     if (id == null)
     {
         return(null);
     }
     if (_steamNameCache.TryGetValue(id, out var name))
     {
         return(name);
     }
     return(_steamNameCache[id] = IsValidSteamId(id) ? await Task.Run(() => SteamWebProvider.TryToGetUserName(id)) : null);
 }
Example #2
0
 public static async Task <string> GetSteamName(string id)
 {
     return(IsValidSteamId(id) ? await Task.Run(() => SteamWebProvider.TryToGetUserName(id)) : null);
 }