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))); }
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); }