void LocalizationEntry_ParseLocalizationFile() { var files = GetAllLocalizationFiles(); foreach (string file in files) { string xml = File.ReadAllText(file); Assert.True(LocalizationEntry.ParseLocalizationFile(xml).Any()); } }
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); } } }