using System.Reflection.PortableExecutable;
namespace Semmle.Extraction.PDB
{
internal static class PdbReader
{
///
/// Returns the PDB information associated with an assembly.
///
/// The path to the assembly.
/// The PE reader for the assembly.
/// A PdbReader, or null if no PDB information is available.
public static IPdb? Create(string assemblyPath, PEReader peReader)
{
return (IPdb?)MetadataPdbReader.CreateFromAssembly(assemblyPath, peReader) ??
NativePdbReader.CreateFromAssembly(peReader);
}
}
}