mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
33 lines
920 B
C#
33 lines
920 B
C#
using System.Collections.Generic;
|
|
|
|
namespace Semmle.Extraction.CIL.Entities
|
|
{
|
|
internal class PdbSourceFile : File
|
|
{
|
|
private readonly PDB.ISourceFile file;
|
|
|
|
public PdbSourceFile(Context cx, PDB.ISourceFile file) : base(cx, file.Path)
|
|
{
|
|
this.file = file;
|
|
}
|
|
|
|
public override IEnumerable<IExtractionProduct> Contents
|
|
{
|
|
get
|
|
{
|
|
foreach (var c in base.Contents)
|
|
yield return c;
|
|
|
|
var text = file.Contents;
|
|
|
|
if (text is null)
|
|
Context.Extractor.Logger.Log(Util.Logging.Severity.Warning, string.Format("PDB source file {0} could not be found", OriginalPath));
|
|
else
|
|
Context.TrapWriter.Archive(TransformedPath, text);
|
|
|
|
yield return Tuples.file_extraction_mode(this, 2);
|
|
}
|
|
}
|
|
}
|
|
}
|