public async Task <IEnumerable <Match> > ListInCommonWith(IKitIdentity match) { if (TryGetStoredResult("ListInCommonWith", out IEnumerable <Match> cached, match.ResultId2)) { return(cached); } var result = await _service.ListInCommonWith(match); StoreResult("ListInCommonWith", result, match.ResultId2); return(result); }
private void AddInCommonWith(IEnumerable <Kit> kits) { int kitCount = kits.Count(); _logger.LogInfo("Fetching ICW information..."); ConsoleProgressBar progress = _logger.ShowProgress(kitCount); int kitIndex = 1; foreach (var kit in kits) { var icws = _service.ListInCommonWith(kit).Result; foreach (var icw in icws) { kit.AddInCommonWith(icw); } progress.Draw(kitIndex++); } _logger.LogInfo("Done fetching ICW"); }