Ejemplo n.º 1
0
        void LocalizationEntry_ParseLocalizationFile()
        {
            var files = GetAllLocalizationFiles();

            foreach (string file in files)
            {
                string xml = File.ReadAllText(file);
                Assert.True(LocalizationEntry.ParseLocalizationFile(xml).Any());
            }
        }
Ejemplo n.º 2
0
        IEnumerable <LocalizationEntry> LoadLocalizationEntries()
        {
            var files = new DirectoryInfo(LocalizationFolderName).GetFiles("text_*.xml", SearchOption.AllDirectories);

            foreach (var file in files)
            {
                string text        = File.ReadAllText(file.FullName);
                var    fileEntries = LocalizationEntry.ParseLocalizationFile(text);
                foreach (var fileEntry in fileEntries)
                {
                    yield return(fileEntry);
                }
            }
        }