mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C#: Integrate the assets parsing and fetching in the dependency manager.
This commit is contained in:
@@ -159,6 +159,16 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerable<string> GetCompilationDependencies(ProgressMonitor progressMonitor, IEnumerable<string> assets)
|
||||
{
|
||||
var parser = new Assets(progressMonitor);
|
||||
return assets.SelectMany(asset =>
|
||||
{
|
||||
var json = File.ReadAllText(asset);
|
||||
return parser.TryParse(json, out var dependencies) ? dependencies : Array.Empty<string>();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
internal static class JsonExtensions
|
||||
|
||||
Reference in New Issue
Block a user