@@ -91,7 +91,7 @@ public DependencyManager(string srcDir, ILogger logger)
9191 this . generatedSources = new ( ) ;
9292 var allProjects = allNonBinaryFiles . SelectFileNamesByExtension ( ".csproj" ) . ToList ( ) ;
9393 var allSolutions = allNonBinaryFiles . SelectFileNamesByExtension ( ".sln" ) . ToList ( ) ;
94- var dllPaths = allFiles . SelectFileNamesByExtension ( ".dll" ) . Select < string , AssemblyPath > ( x => x ) . ToHashSet ( ) ;
94+ var dllPaths = allFiles . SelectFileNamesByExtension ( ".dll" ) . Select ( x => new AssemblyLookupLocation ( x ) ) . ToHashSet ( ) ;
9595
9696 logger . LogInfo ( $ "Found { allFiles . Count } files, { nonGeneratedSources . Count } source files, { allProjects . Count } project files, { allSolutions . Count } solution files, { dllPaths . Count } DLLs.") ;
9797
@@ -192,7 +192,7 @@ void exitCallback(int ret, string msg, bool silent)
192192 ] ) ;
193193 }
194194
195- private HashSet < string > AddFrameworkDlls ( HashSet < AssemblyPath > dllPaths )
195+ private HashSet < string > AddFrameworkDlls ( HashSet < AssemblyLookupLocation > dllPaths )
196196 {
197197 var frameworkLocations = new HashSet < string > ( ) ;
198198
@@ -230,7 +230,7 @@ private HashSet<string> AddFrameworkDlls(HashSet<AssemblyPath> dllPaths)
230230 continue ;
231231 }
232232
233- dllPaths . UnionWith ( dlls . Select < string , AssemblyPath > ( x => x ) ) ;
233+ dllPaths . UnionWith ( dlls . Select ( x => new AssemblyLookupLocation ( x ) ) ) ;
234234 frameworkLocations . UnionWith ( dlls ) ;
235235 }
236236 catch ( Exception e )
@@ -284,7 +284,7 @@ private void RemoveNugetAnalyzerReferences()
284284 }
285285 }
286286
287- private void SelectNewestFrameworkPath ( string frameworkPath , string frameworkType , ISet < AssemblyPath > dllPaths , ISet < string > frameworkLocations )
287+ private void SelectNewestFrameworkPath ( string frameworkPath , string frameworkType , ISet < AssemblyLookupLocation > dllPaths , ISet < string > frameworkLocations )
288288 {
289289 var versionFolders = GetPackageVersionSubDirectories ( frameworkPath ) ;
290290 if ( versionFolders . Length > 1 )
@@ -313,7 +313,7 @@ private static DirectoryInfo[] GetPackageVersionSubDirectories(string packagePat
313313 . ToArray ( ) ;
314314 }
315315
316- private void RemoveFrameworkNugetPackages ( ISet < AssemblyPath > dllPaths , int fromIndex = 0 )
316+ private void RemoveFrameworkNugetPackages ( ISet < AssemblyLookupLocation > dllPaths , int fromIndex = 0 )
317317 {
318318 var packagesInPrioOrder = FrameworkPackageNames . NetFrameworks ;
319319 for ( var i = fromIndex ; i < packagesInPrioOrder . Length ; i ++ )
@@ -322,7 +322,7 @@ private void RemoveFrameworkNugetPackages(ISet<AssemblyPath> dllPaths, int fromI
322322 }
323323 }
324324
325- private void AddNetFrameworkDlls ( ISet < AssemblyPath > dllPaths , ISet < string > frameworkLocations )
325+ private void AddNetFrameworkDlls ( ISet < AssemblyLookupLocation > dllPaths , ISet < string > frameworkLocations )
326326 {
327327 // Multiple dotnet framework packages could be present.
328328 // The order of the packages is important, we're adding the first one that is present in the nuget cache.
@@ -371,7 +371,7 @@ private void AddNetFrameworkDlls(ISet<AssemblyPath> dllPaths, ISet<string> frame
371371 if ( runtimeLocation is null )
372372 {
373373 runtimeLocation ??= Runtime . ExecutingRuntime ;
374- dllPaths . Add ( new AssemblyPath ( runtimeLocation , name => ! name . StartsWith ( "Semmle." ) ) ) ;
374+ dllPaths . Add ( new AssemblyLookupLocation ( runtimeLocation , name => ! name . StartsWith ( "Semmle." ) ) ) ;
375375 }
376376 else
377377 {
@@ -382,7 +382,7 @@ private void AddNetFrameworkDlls(ISet<AssemblyPath> dllPaths, ISet<string> frame
382382 frameworkLocations . Add ( runtimeLocation ) ;
383383 }
384384
385- private void RemoveNugetPackageReference ( string packagePrefix , ISet < AssemblyPath > dllPaths )
385+ private void RemoveNugetPackageReference ( string packagePrefix , ISet < AssemblyLookupLocation > dllPaths )
386386 {
387387 var packageFolder = packageDirectory . DirInfo . FullName . ToLowerInvariant ( ) ;
388388 if ( packageFolder == null )
@@ -404,7 +404,7 @@ private bool IsAspNetCoreDetected()
404404 return fileContent . IsNewProjectStructureUsed && fileContent . UseAspNetCoreDlls ;
405405 }
406406
407- private void AddAspNetCoreFrameworkDlls ( ISet < AssemblyPath > dllPaths , ISet < string > frameworkLocations )
407+ private void AddAspNetCoreFrameworkDlls ( ISet < AssemblyLookupLocation > dllPaths , ISet < string > frameworkLocations )
408408 {
409409 if ( ! IsAspNetCoreDetected ( ) )
410410 {
@@ -426,7 +426,7 @@ private void AddAspNetCoreFrameworkDlls(ISet<AssemblyPath> dllPaths, ISet<string
426426 }
427427 }
428428
429- private void AddMicrosoftWindowsDesktopDlls ( ISet < AssemblyPath > dllPaths , ISet < string > frameworkLocations )
429+ private void AddMicrosoftWindowsDesktopDlls ( ISet < AssemblyLookupLocation > dllPaths , ISet < string > frameworkLocations )
430430 {
431431 if ( GetPackageDirectory ( FrameworkPackageNames . WindowsDesktopFramework , packageDirectory ) is string windowsDesktopApp )
432432 {
0 commit comments