Пример #1
0
        private static ISymUnmanagedReader CreatePortableSymReader(Stream pdbStream, object metadataImporter)
        {
            var binder = new PortablePdb.SymBinder();

            ISymUnmanagedReader reader;
            int hr = binder.GetReaderFromStream(metadataImporter, new ComStreamWrapper(pdbStream), out reader);
            SymUnmanagedReaderExtensions.ThrowExceptionForHR(hr);

            return reader;
        }
Пример #2
0
        private static ISymUnmanagedReader CreatePortableSymReader(Stream pdbStream, object metadataImporter)
        {
            var binder = new PortablePdb.SymBinder();

            ISymUnmanagedReader reader;
            int hr = binder.GetReaderFromStream(metadataImporter, new ComStreamWrapper(pdbStream), out reader);

            SymUnmanagedReaderExtensions.ThrowExceptionForHR(hr);

            return(reader);
        }
Пример #3
0
        public static ISymUnmanagedReader CreateReader(Stream pdbStream, object metadataImporter)
        {
            pdbStream.Position = 0;
            bool isPortable = pdbStream.ReadByte() == 'B' && pdbStream.ReadByte() == 'S' && pdbStream.ReadByte() == 'J' && pdbStream.ReadByte() == 'B';
            pdbStream.Position = 0;

            if (isPortable)
            {
                var binder = new PortablePdb.SymBinder();

                ISymUnmanagedReader reader;
                int hr = binder.GetReaderFromStream(metadataImporter, new ComStreamWrapper(pdbStream), out reader);
                SymUnmanagedReaderExtensions.ThrowExceptionForHR(hr);

                return reader;
            }
            else
            {
                return CreateNativeSymReader(pdbStream, metadataImporter);
            }
        }
Пример #4
0
        public static ISymUnmanagedReader CreateReader(Stream pdbStream, object metadataImporter)
        {
            pdbStream.Position = 0;
            bool isPortable = pdbStream.ReadByte() == 'B' && pdbStream.ReadByte() == 'S' && pdbStream.ReadByte() == 'J' && pdbStream.ReadByte() == 'B';

            pdbStream.Position = 0;

            if (isPortable)
            {
                var binder = new PortablePdb.SymBinder();

                ISymUnmanagedReader reader;
                int hr = binder.GetReaderFromStream(metadataImporter, new ComStreamWrapper(pdbStream), out reader);
                SymUnmanagedReaderExtensions.ThrowExceptionForHR(hr);

                return(reader);
            }
            else
            {
                return(CreateNativeSymReader(pdbStream, metadataImporter));
            }
        }