diff --git a/ILSpy.BamlDecompiler.Tests/BamlTestRunner.cs b/ILSpy.BamlDecompiler.Tests/BamlTestRunner.cs index a44d75149e..65557f741b 100644 --- a/ILSpy.BamlDecompiler.Tests/BamlTestRunner.cs +++ b/ILSpy.BamlDecompiler.Tests/BamlTestRunner.cs @@ -8,6 +8,7 @@ using System.Threading; using System.Xml.Linq; using ICSharpCode.Decompiler.Tests.Helpers; +using ICSharpCode.Decompiler.Util; using Mono.Cecil; using NUnit.Framework; @@ -142,14 +143,14 @@ Stream LoadBaml(Resource res, string name) if (er != null) { Stream s = er.GetResourceStream(); s.Position = 0; - ResourceReader reader; + ResourcesFile resources; try { - reader = new ResourceReader(s); + resources = new ResourcesFile(s); } catch (ArgumentException) { return null; } - foreach (DictionaryEntry entry in reader.Cast().OrderBy(e => e.Key.ToString())) { - if (entry.Key.ToString() == name) { + foreach (var entry in resources.OrderBy(e => e.Key)) { + if (entry.Key == name) { if (entry.Value is Stream) return (Stream)entry.Value; if (entry.Value is byte[])