예제 #1
0
파일: PdbHelper.cs 프로젝트: sidecut/xaeios
        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;
        }
예제 #2
0
		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;
        }
예제 #4
0
파일: PdbWriter.cs 프로젝트: atykhyy/cecil
 internal PdbWriter(ModuleDefinition module, SymWriter writer)
 {
     this.module = module;
     this.writer = writer;
     this.documents = new Dictionary<string, SymDocumentWriter> ();
 }
예제 #5
0
 internal PdbWriter(SymWriter writer)
 {
     this.writer = writer;
     this.documents = new Dictionary<string, SymDocumentWriter> ();
 }