mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
Revert unneeded changes and simplify code
This commit is contained in:
@@ -5,51 +5,6 @@ using Semmle.Extraction.CSharp.DependencyFetching;
|
||||
|
||||
namespace Semmle.Extraction.CSharp.Standalone
|
||||
{
|
||||
/// <summary>
|
||||
/// One independent run of the extractor.
|
||||
/// </summary>
|
||||
internal class Extraction
|
||||
{
|
||||
public Extraction(string directory)
|
||||
{
|
||||
Directory = directory;
|
||||
}
|
||||
|
||||
public string Directory { get; }
|
||||
public List<string> Sources { get; } = new List<string>();
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Searches for source/references and creates separate extractions.
|
||||
/// </summary>
|
||||
internal sealed class Analysis : IDisposable
|
||||
{
|
||||
public Analysis(ILogger logger, Options options)
|
||||
{
|
||||
dependencyManager = new DependencyManager(options.SrcDir, options.Dependencies, logger);
|
||||
References = dependencyManager.ReferenceFiles;
|
||||
Extraction = new Extraction(options.SrcDir);
|
||||
Extraction.Sources.AddRange(dependencyManager.AllSourceFiles);
|
||||
CompilationInfos = dependencyManager.CompilationInfos;
|
||||
}
|
||||
|
||||
public IEnumerable<string> References { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The extraction configuration.
|
||||
/// </summary>
|
||||
public Extraction Extraction { get; }
|
||||
|
||||
public IEnumerable<(string, string)> CompilationInfos { get; }
|
||||
|
||||
private readonly DependencyManager dependencyManager;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
dependencyManager.Dispose();
|
||||
}
|
||||
};
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static int Main(string[] args)
|
||||
|
||||
Reference in New Issue
Block a user