Ejemplo n.º 1
0
        private static void CompareNewList()
        {
            var webloader   = new DigimonWebLoader(new List <string>());
            var digimon     = webloader.Load();
            var digimonList = new DigimonList();

            digimonList.LoadDigimon();
            var notInList = digimon.Where(x => !digimonList.DigimonAlreadyExists(x.Name) &&
                                          !x.Name.Contains("X-Antibody") &&
                                          !x.Name.StartsWith("Bio") &&
                                          !digimonList.IsInvalidMonster(x.Name));
            var y = 5;
        }
Ejemplo n.º 2
0
        private static void CompareReferenceAndMedalList()
        {
            var directory     = Directory.GetCurrentDirectory();
            var listFilePath  = Path.Combine(directory, "InRefeBook.txt");
            var referenceList = new DigimonList();

            foreach (var line in File.ReadAllLines(listFilePath))
            {
                if (!String.IsNullOrWhiteSpace(line))
                {
                    referenceList.DigimonCollection.Add(new Digimon {
                        Name = line.Trim()
                    });
                }
            }
            listFilePath = Path.Combine(directory, "InMedal.txt");
            var medalList = new DigimonList();

            foreach (var line in File.ReadAllLines(listFilePath))
            {
                if (!String.IsNullOrWhiteSpace(line))
                {
                    if (Regex.IsMatch(line, "\\[(.*?)\\]"))
                    {
                        var digimon = Regex.Match(line, "\\[(.*?)\\]").Value.Replace("[", string.Empty).Replace("]", string.Empty);
                        medalList.DigimonCollection.Add(new Digimon {
                            Name = digimon
                        });
                    }
                }
            }
            var notInMedalList = referenceList.DigimonCollection.Where(x => !medalList.DigimonAlreadyExists(x.Name) &&
                                                                       !medalList.IsInvalidMonster(x.Name));
            var notInRefList = medalList.DigimonCollection.Where(x => !referenceList.DigimonAlreadyExists(x.Name) &&
                                                                 !medalList.IsInvalidMonster(x.Name)).OrderBy(x => x.Name);
            var y = 5;
        }
Ejemplo n.º 3
0
        private static void CompareReferenceList()
        {
            var digimonList = new DigimonList();

            digimonList.LoadDigimon();
            var directory     = Directory.GetCurrentDirectory();
            var listFilePath  = Path.Combine(directory, "InRefeBook.txt");
            var referenceList = new DigimonList();

            foreach (var line in File.ReadAllLines(listFilePath))
            {
                if (!String.IsNullOrWhiteSpace(line))
                {
                    referenceList.DigimonCollection.Add(new Digimon {
                        Name = line.Trim()
                    });
                }
            }
            var notInMyList = referenceList.DigimonCollection.Where(x => !digimonList.DigimonAlreadyExists(x.Name) &&
                                                                    !digimonList.IsInvalidMonster(x.Name));
            var notInRefList = digimonList.DigimonCollection.Where(x => !referenceList.DigimonAlreadyExists(x.Name) &&
                                                                   !x.Name.StartsWith("Bio") &&
                                                                   !digimonList.IsInvalidMonster(x.Name)).OrderBy(x => x.Name);
        }