public async Task <HProfile> GetProfileAsync(string name, HHotel hotel) { if (!_profileCache.ContainsKey(hotel)) { _profileCache[hotel] = new Dictionary <string, HProfile>(); } if (!_profileCache[hotel].ContainsKey(name)) { HProfile profile = await SKore.GetProfileAsync( name, hotel).ConfigureAwait(false); _profileCache[hotel][name] = profile; } return(_profileCache[hotel][name]); }
public async Task <HProfile> GetProfileAsync(AuthorAttribute authorAtt) { if (!_profileCache.ContainsKey(authorAtt.Hotel)) { _profileCache[authorAtt.Hotel] = new Dictionary <string, HProfile>(); } if (_profileCache[authorAtt.Hotel] .ContainsKey(authorAtt.HabboName)) { return(_profileCache[authorAtt.Hotel][authorAtt.HabboName]); } HProfile profile = await SKore.GetProfileAsync( authorAtt.HabboName, authorAtt.Hotel).ConfigureAwait(false); _profileCache[authorAtt.Hotel][authorAtt.HabboName] = profile; return(profile); }