public async Task <IEnumerable <Realm> > GetRealms(EfEnums.GameRegionEnum region) { return(await this.cache.GetOrCacheAsync(async() => { var json = await this.blizzardService.GetRealmsByRegionAsync(BlizzardUtilities.GetBlizzardRegionFromEfRegion(region)); return RealmParsing.GetRealms(json); }, () => this.GetKey(region))); }
public async Task <Realm> GetRealmAsync(string realmName, BlizzardRegion region) { var result = await this.blizzardService.GetRealmAsync(realmName, region); if (BlizzardService.DidGetFail(result)) { return(null); } return(RealmParsing.GetSingleRealm(result)); }