public override bool Execute() { string pdbxmlFile = Path.ChangeExtension(AssemblyName.ItemSpec, ".pdb.xml"); _pddxmlFile = new TaskItem(pdbxmlFile); xwriter = new XmlTextWriter(pdbxmlFile, null); xwriter.Formatting = Formatting.Indented; //Log.LogMessage("Get symbol reader for file {0}", Path.ChangeExtension(AssemblyName.ItemSpec, ".pdb")); ISymbolReader reader = SymUtil.GetSymbolReaderForFile(AssemblyName.ItemSpec, null); //Log.LogMessage("Load assembly"); m_assembly = System.Reflection.Assembly.LoadFrom(AssemblyName.ItemSpec); // Begin writing XML. xwriter.WriteStartDocument(); xwriter.WriteComment("This is an XML file representing the PDB for '" + AssemblyName.ItemSpec + "'"); xwriter.WriteStartElement("Types"); // Record what input file these symbols are for. xwriter.WriteAttributeString("file", AssemblyName.ItemSpec); //WriteDocList(reader); WriteTypesAndDocs(reader); xwriter.WriteEndElement(); // "Symbols"; xwriter.Close(); return !Log.HasLoggedErrors; }
// Wrapper. public static ISymbolReader GetSymbolReaderForFile(string pathModule, string searchPath) { return(SymUtil.GetSymbolReaderForFile(new SymbolBinder(), pathModule, searchPath)); }