Exemple #1
0
        internal SymReader(byte[] pdbBytes, ImmutableDictionary <string, byte[]> constantSignaturesOpt = null)
        {
            _reader = SymUnmanagedReaderTestExtensions.CreateReader(
                new MemoryStream(pdbBytes),
                PDB::Roslyn.Test.PdbUtilities.DummyMetadataImport.Instance);

            _constantSignaturesOpt = constantSignaturesOpt;
        }
Exemple #2
0
        public SymReader(Stream[] pdbStreamsByVersion, ImmutableDictionary <string, byte[]> constantSignaturesOpt = null)
        {
            _readerVersions = pdbStreamsByVersion.Select(
                pdbStream =>
                SymUnmanagedReaderTestExtensions.CreateReader(pdbStream, DummyMetadataImport.Instance)).ToArray();

            // If ISymUnmanagedReader3 is available, then we shouldn't be passing in multiple byte streams - one should suffice.
            Debug.Assert(!(UnversionedReader is ISymUnmanagedReader3) || _readerVersions.Length == 1);

            _constantSignaturesOpt = constantSignaturesOpt;
        }
Exemple #3
0
        public SymReader(Stream[] pdbStreamsByVersion, Stream peStreamOpt, MetadataReader metadataReaderOpt)
        {
            if (peStreamOpt != null)
            {
                _peReaderOpt    = new PEReader(peStreamOpt);
                _metadataImport = new DummyMetadataImport(_peReaderOpt.GetMetadataReader());
            }
            else
            {
                _metadataImport = new DummyMetadataImport(metadataReaderOpt);
            }

            _readerVersions = pdbStreamsByVersion.Select(
                pdbStream =>
                SymUnmanagedReaderTestExtensions.CreateReader(pdbStream, _metadataImport)).ToArray();

            // If ISymUnmanagedReader3 is available, then we shouldn't be passing in multiple byte streams - one should suffice.
            Debug.Assert(!(UnversionedReader is ISymUnmanagedReader3) || _readerVersions.Length == 1);
        }
 internal static ISymUnmanagedReader CreateReader(Stream pdb)
 {
     return(SymUnmanagedReaderTestExtensions.CreateReader(pdb, DummyMetadataImport.Instance));
 }