示例#1
0
        public IEnumerable <string> GetAlternativeFiles(string fileName, string baseName, string ext)
        {
            var r = addin.GetResourceInfo(fileName);

            if (!resources.TryGetValue(r.ReferencedAssembly, out var resourceList))
            {
                resourceList = resources [r.ReferencedAssembly] = r.ReferencedAssembly.GetManifestResourceNames().ToList();
                resourceList.Sort();                  // sort resources by name
            }

            return(resourceList.Where(r => r.StartsWith(baseName) && r.EndsWith(ext)));
        }
示例#2
0
        public IEnumerable <string> GetAlternativeFiles(string fileName, string baseName, string ext)
        {
            var r = addin.GetResourceInfo(fileName);

            string [] resourceList;
            if (!resources.TryGetValue(r.ReferencedAssembly, out resourceList))
            {
                resourceList = resources [r.ReferencedAssembly] = r.ReferencedAssembly.GetManifestResourceNames();
            }

            return(resourceList);
        }