Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public AssemblyInfo(Assembly asm, XmlAssemblyDocument xml)
 {
     Assembly    = asm;
     XmlDocument = xml;
 }