public Loader( CardRepository repository, ImageRepository imageRepository, LocalizationRepository localizationRepository, CardSearcher cardSearcher, KeywordSearcher keywordSearcher, PriceRepository priceRepository) { _repository = repository; _imageRepository = imageRepository; _localizationRepository = localizationRepository; _cardSearcher = cardSearcher; _keywordSearcher = keywordSearcher; _priceRepository = priceRepository; _loadingActions = createLoadingActions(); }
public void FillLocalizations(LocalizationRepository localizationRepository) { //var generatedManaMismatchCards = new List<Card>(); for (int i = 0; i < Cards.Count; i++) { var card = Cards[i]; card.Localization = localizationRepository.GetLocalization(card); //if (!string.IsNullOrEmpty(card.Localization?.GeneratedMana) && string.IsNullOrEmpty(card.GeneratedMana)) //{ // generatedManaMismatchCards.Add(card); //} } IsLocalizationLoadingComplete = true; LocalizationLoadingComplete?.Invoke(); }
public void FillLocalizations(LocalizationRepository localizationRepository) { //var generatedManaMismatchCards = new List<Card>(); for (int i = 0; i < Cards.Count; i++) { var card = Cards[i]; card.Localization = localizationRepository.GetLocalization(card); //if (!string.IsNullOrEmpty(card.Localization?.GeneratedMana) && string.IsNullOrEmpty(card.GeneratedMana)) //{ // generatedManaMismatchCards.Add(card); //} card.Namesakes = CardsByName[card.NameNormalized] .Where(c => c != card) .OrderByDescending(c => c.ReleaseDate) .ToArray(); } IsLocalizationLoadingComplete = true; LocalizationLoadingComplete?.Invoke(); }