Exemplo n.º 1
0
 private void Close()
 {
     try
     {
         _symWriter?.Close();
         _metadataImport?.Dispose();
         _metadataImport = null;
         _symWriter      = null;
         _pdbStream      = null;
     }
     catch (Exception ex)
     {
         throw new PdbWritingException(ex);
     }
 }
Exemplo n.º 2
0
        public void WriteTo(Stream stream)
        {
            Debug.Assert(_pdbStream != null);
            Debug.Assert(_symWriter != null);

            try
            {
                // SymWriter flushes data to the native stream on close:
                _symWriter.Close();
                _symWriter = null;
                _pdbStream.CopyTo(stream);
            }
            catch (Exception ex)
            {
                throw new PdbWritingException(ex);
            }
        }
Exemplo n.º 3
0
 public SymUnmanagedWriter(MetadataReader metadataReader)
 {
     _pdbStream      = new ComMemoryStream();
     _metadataImport = new SymReaderMetadataImport(metadataReader, metadataOwnerOpt: null);
     _symWriter      = SymReaderFactory.CreateWindowsPdbWriter(_pdbStream, _metadataImport);
 }