private bool TryCreateReaderForMatchingPdb( string pdbFilePath, Guid guid, uint stamp, int age, LazyMetadataImport metadataImport, out ISymUnmanagedReader reader) { if (PortableShim.File.Exists(pdbFilePath)) { PortablePdbReader pdbReader; try { pdbReader = new PortablePdbReader(SymReader.CreateProviderFromFile(pdbFilePath), version: 1, previousDocumentCount: 0); } catch { reader = null; return(false); } try { if (pdbReader.MatchesModule(guid, stamp, age)) { reader = new SymReader(pdbReader, metadataImport); pdbReader = null; return(true); } } finally { pdbReader?.Dispose(); } } reader = null; return(false); }
public int MatchesModule(Guid guid, uint stamp, int age, [MarshalAs(UnmanagedType.Bool)] out bool result) { result = _pdbReader.MatchesModule(guid, stamp, age); return(HResult.S_OK); }