Browse Source

AnalyzerScope: Retrieve list of assemblies only once and not in every iteration.

pull/2606/head
Siegfried Pammer 3 years ago
parent
commit
1c0460d077
  1. 3
      ILSpy/Analyzers/AnalyzerScope.cs

3
ILSpy/Analyzers/AnalyzerScope.cs

@ -131,11 +131,12 @@ namespace ICSharpCode.ILSpy.Analyzers @@ -131,11 +131,12 @@ namespace ICSharpCode.ILSpy.Analyzers
toWalkFiles.Push(self);
checkedFiles.Add(self);
IList<LoadedAssembly> assemblies = AssemblyList.GetAllAssemblies().GetAwaiter().GetResult();
do
{
PEFile curFile = toWalkFiles.Pop();
foreach (var assembly in AssemblyList.GetAllAssemblies().GetAwaiter().GetResult())
foreach (var assembly in assemblies)
{
ct.ThrowIfCancellationRequested();
bool found = false;

Loading…
Cancel
Save