static XmlAssemblyDocument GetXmlDocument(string assemblyFilePath) { // check for an XML file for this assembly in a case-insensitive way, even though Windows is generally case-insensitive var dir = Path.GetDirectoryName(assemblyFilePath); var filePattern = Path.GetFileNameWithoutExtension(assemblyFilePath) + ".*"; foreach (var file in Directory.GetFiles(dir, filePattern, SearchOption.TopDirectoryOnly)) { if (string.Compare(Path.GetExtension(file), ".xml", StringComparison.InvariantCultureIgnoreCase) == 0) { return(XmlAssemblyDocument.GetFromFile(file)); } } return(null); }
public AssemblyInfo(Assembly asm, XmlAssemblyDocument xml) { Assembly = asm; XmlDocument = xml; }