diff --git a/GangsTest/TestLocale/LocaleFileKVData.cs b/GangsTest/TestLocale/LocaleFileKVData.cs index b86243b..687a0a5 100644 --- a/GangsTest/TestLocale/LocaleFileKVData.cs +++ b/GangsTest/TestLocale/LocaleFileKVData.cs @@ -1,10 +1,14 @@ -using Microsoft.Extensions.Localization; +using System.Collections; +using Microsoft.Extensions.Localization; namespace GangsTest.TestLocale; -public class LocaleFileKVData : TheoryData { - public LocaleFileKVData() { - foreach (var localizedString in StringLocalizer.Instance.GetAllStrings()) - Add(localizedString.Name, localizedString.Value); +public class LocaleFileKVData : IEnumerable { + public IEnumerator GetEnumerator() { + return StringLocalizer.Instance.GetAllStrings(true) + .Select(keyValuePair => (object[]) [keyValuePair.Name, keyValuePair.Value]) + .GetEnumerator(); } + + IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } } \ No newline at end of file