Example #1
0
        public ISymbolWriter GetSymbolWriter(ModuleDefinition module, string fileName, Func <string, string> sourcePathRewriter, Action <Signature> signatureProvider)
        {
            var reader = module.SymbolReader;

            if (reader == null)
            {
                throw new InvalidOperationException();
            }

            if (module.Image != null && module.Image.HasDebugTables())
            {
                return(null);
            }

            var reader_kind = SymbolProvider.GetSymbolKind(reader.GetType());

            return(SymbolProvider.GetWriterProvider(reader_kind).GetSymbolWriter(module, fileName, sourcePathRewriter, signatureProvider));
        }
Example #2
0
        public ISymbolWriter GetSymbolWriter(ModuleDefinition module, string fileName)
        {
            var reader = module.SymbolReader;

            if (reader == null)
            {
                throw new InvalidOperationException();
            }

            if (module.Image != null && module.Image.HasDebugTables())
            {
                return(null);
            }

            var reader_kind = SymbolProvider.GetSymbolKind(reader.GetType());

            return(SymbolProvider.GetWriterProvider(reader_kind).GetSymbolWriter(module, fileName));
        }