public static ISymbolWriter CreateWriter(string assembly, string pdb) { SymWriter writer = new SymWriter (false); object objDispenser, objImporter; CoCreateInstance (ref s_dispenserClassID, null, 1, ref s_dispenserIID, out objDispenser); IMetaDataDispenser dispenser = (IMetaDataDispenser) objDispenser; dispenser.OpenScope (assembly, 1, ref s_importerIID, out objImporter); IntPtr importerPtr = Marshal.GetComInterfaceForObject (objImporter, typeof (IMetadataImport)); try { if (File.Exists (pdb)) File.Delete (pdb); writer.Initialize (importerPtr, pdb, false); } finally { if (importerPtr != IntPtr.Zero) { Marshal.Release (importerPtr); Marshal.ReleaseComObject (objDispenser); Marshal.ReleaseComObject (objImporter); Marshal.ReleaseComObject (dispenser); } } return writer; }
internal PdbWriter (SymWriter writer, ModuleDefinition module, string assembly) { m_writer = writer; m_module = module; m_documents = new Hashtable (); m_assembly = assembly; }
internal PdbWriter(ModuleDefinition module, SymWriter writer, /*Telerik Authorship*/ Dictionary<MethodDefinition, Dictionary<VariableDefinition, string>> methodsVariableDefinitionToNameMap) { this.module = module; this.writer = writer; this.documents = new Dictionary<string, SymDocumentWriter> (); /*Telerik Authorship*/ this.methodsVariableDefinitionToNameMap = methodsVariableDefinitionToNameMap; }
internal PdbWriter(ModuleDefinition module, SymWriter writer) { this.module = module; this.writer = writer; this.documents = new Dictionary<string, SymDocumentWriter> (); }
internal PdbWriter(SymWriter writer) { this.writer = writer; this.documents = new Dictionary<string, SymDocumentWriter> (); }