public OhlcData GetRange(TimeRange timeRange) { lock (Lock) { Ctx.Status("Requesting in-memory data"); var seriesId = _adapter.SeriesId; if (!CoverageMap.Covers(timeRange)) { return(null); } var r = MemoryCache.Where(x => x.SeriesId == seriesId && x.DateTimeUtc >= timeRange.UtcFrom && x.DateTimeUtc <= timeRange.UtcTo).ToList(); var d = new OhlcData(timeRange.TimeResolution); d.AddRange(r); return(d); } }