@@ -46,7 +46,7 @@ public sealed partial class DependencyManager : IDisposable
4646 /// <summary>
4747 /// Performs C# dependency fetching.
4848 /// </summary>
49- /// <param name="options">Dependency fetching options </param>
49+ /// <param name="srcDir">Path to directory containing source code. </param>
5050 /// <param name="logger">Logger for dependency fetching progress.</param>
5151 public DependencyManager ( string srcDir , ILogger logger )
5252 {
@@ -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" ) . ToHashSet ( ) ;
94+ var dllPaths = allFiles . SelectFileNamesByExtension ( ".dll" ) . Select < string , AssemblyPath > ( x => 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 < string > dllPaths )
195+ private HashSet < string > AddFrameworkDlls ( HashSet < AssemblyPath > dllPaths )
196196 {
197197 var frameworkLocations = new HashSet < string > ( ) ;
198198
@@ -230,7 +230,7 @@ private HashSet<string> AddFrameworkDlls(HashSet<string> dllPaths)
230230 continue ;
231231 }
232232
233- dllPaths . UnionWith ( dlls ) ;
233+ dllPaths . UnionWith ( dlls . Select < string , AssemblyPath > ( x => 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 < string > dllPaths , ISet < string > frameworkLocations )
287+ private void SelectNewestFrameworkPath ( string frameworkPath , string frameworkType , ISet < AssemblyPath > 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 < string > dllPaths , int fromIndex = 0 )
316+ private void RemoveFrameworkNugetPackages ( ISet < AssemblyPath > 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<string> dllPaths, int fromIndex =
322322 }
323323 }
324324
325- private void AddNetFrameworkDlls ( ISet < string > dllPaths , ISet < string > frameworkLocations )
325+ private void AddNetFrameworkDlls ( ISet < AssemblyPath > 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.
@@ -375,7 +375,7 @@ private void AddNetFrameworkDlls(ISet<string> dllPaths, ISet<string> frameworkLo
375375 frameworkLocations . Add ( runtimeLocation ) ;
376376 }
377377
378- private void RemoveNugetPackageReference ( string packagePrefix , ISet < string > dllPaths )
378+ private void RemoveNugetPackageReference ( string packagePrefix , ISet < AssemblyPath > dllPaths )
379379 {
380380 var packageFolder = packageDirectory . DirInfo . FullName . ToLowerInvariant ( ) ;
381381 if ( packageFolder == null )
@@ -384,7 +384,7 @@ private void RemoveNugetPackageReference(string packagePrefix, ISet<string> dllP
384384 }
385385
386386 var packagePathPrefix = Path . Combine ( packageFolder , packagePrefix . ToLowerInvariant ( ) ) ;
387- var toRemove = dllPaths . Where ( s => s . StartsWith ( packagePathPrefix , StringComparison . InvariantCultureIgnoreCase ) ) ;
387+ var toRemove = dllPaths . Where ( s => s . Path . StartsWith ( packagePathPrefix , StringComparison . InvariantCultureIgnoreCase ) ) ;
388388 foreach ( var path in toRemove )
389389 {
390390 dllPaths . Remove ( path ) ;
@@ -397,7 +397,7 @@ private bool IsAspNetCoreDetected()
397397 return fileContent . IsNewProjectStructureUsed && fileContent . UseAspNetCoreDlls ;
398398 }
399399
400- private void AddAspNetCoreFrameworkDlls ( ISet < string > dllPaths , ISet < string > frameworkLocations )
400+ private void AddAspNetCoreFrameworkDlls ( ISet < AssemblyPath > dllPaths , ISet < string > frameworkLocations )
401401 {
402402 if ( ! IsAspNetCoreDetected ( ) )
403403 {
@@ -419,7 +419,7 @@ private void AddAspNetCoreFrameworkDlls(ISet<string> dllPaths, ISet<string> fram
419419 }
420420 }
421421
422- private void AddMicrosoftWindowsDesktopDlls ( ISet < string > dllPaths , ISet < string > frameworkLocations )
422+ private void AddMicrosoftWindowsDesktopDlls ( ISet < AssemblyPath > dllPaths , ISet < string > frameworkLocations )
423423 {
424424 if ( GetPackageDirectory ( FrameworkPackageNames . WindowsDesktopFramework , packageDirectory ) is string windowsDesktopApp )
425425 {
0 commit comments