示例#1
0
        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();
        }
示例#2
0
        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();
        }
示例#3
0
        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();
        }