private void Close() { try { _symWriter?.Close(); _metadataImport?.Dispose(); _metadataImport = null; _symWriter = null; _pdbStream = null; } catch (Exception ex) { throw new PdbWritingException(ex); } }
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); } }