/// <summary> /// Adds <paramref name="pdbDoc"/> if it doesn't exist /// </summary> /// <param name="pdbDoc">PDB document</param> /// <returns>A <see cref="ISymbolDocumentWriter"/> instance</returns> ISymbolDocumentWriter Add(PdbDocument pdbDoc) { ISymbolDocumentWriter docWriter; if (pdbDocs.TryGetValue(pdbDoc, out docWriter)) { return(docWriter); } docWriter = writer.DefineDocument(pdbDoc.Url, pdbDoc.Language, pdbDoc.LanguageVendor, pdbDoc.DocumentType); docWriter.SetCheckSum(pdbDoc.CheckSumAlgorithmId, pdbDoc.CheckSum); pdbDocs.Add(pdbDoc, docWriter); return(docWriter); }
private void WriteFiles() { foreach (XmlElement node in m_doc.GetElementsByTagName("file")) { ISymbolDocumentWriter docwriter = m_writer.DefineDocument( node.GetAttribute("name"), new Guid(node.GetAttribute("language")), new Guid(node.GetAttribute("languageVendor")), new Guid(node.GetAttribute("documentType")) ); int id = Util.ToInt32(node.GetAttribute("id")); m_docWriters.Add(id, docwriter); m_sequencePoints.Add(id, new List <int> [(int)SequencePoint.size]); for (int i = 0; i < (int)SequencePoint.size; i++) { m_sequencePoints[id][i] = new List <int>(); } } }