ARCed.Plugins.Plugin.ReadResourceConfiguration C# (CSharp) Method

ReadResourceConfiguration() private static method

Reads the assembly's resource files for the configuration strings used in creating the windows
private static ReadResourceConfiguration ( Assembly assembly ) : IEnumerable
assembly System.Reflection.Assembly The assembly to check for resource files
return IEnumerable
        private static IEnumerable<DictionaryEntry> ReadResourceConfiguration(Assembly assembly)
        {
            var config = new List<DictionaryEntry>();
            foreach (var resName in assembly.GetManifestResourceNames())
                using (var stream = assembly.GetManifestResourceStream(resName))
                    if (stream != null)
                        using (var reader = new ResourceReader(stream))
                        {
                            var kvp = reader.GetEnumerator();
                            while (kvp.MoveNext())
                                config.Add(kvp.Entry);
                        }
            return config;
        }