public byte[] GetTile(TileInfo tileInfo) { var bytes = _persistentCache.Find(tileInfo.Index); if (bytes == null) { bytes = _fetchTile(Request.GetUri(tileInfo)); if (bytes != null) { _persistentCache.Add(tileInfo.Index, bytes); } } return(bytes); }
public byte[] GetTile(TileInfo tileInfo) { var bytes = _persistentCache.Find(tileInfo.Index); if (bytes == null) { bytes = RequestHelper.FetchImage(_webRequestFactory(_request.GetUri(tileInfo))); if (bytes != null) { _persistentCache.Add(tileInfo.Index, bytes); } } return(bytes); }