@@ -46,7 +46,7 @@ public sealed partial class DependencyManager : IDisposable
46
46
/// <summary>
47
47
/// Performs C# dependency fetching.
48
48
/// </summary>
49
- /// <param name="options">Dependency fetching options </param>
49
+ /// <param name="srcDir">Path to directory containing source code. </param>
50
50
/// <param name="logger">Logger for dependency fetching progress.</param>
51
51
public DependencyManager ( string srcDir , ILogger logger )
52
52
{
@@ -91,7 +91,7 @@ public DependencyManager(string srcDir, ILogger logger)
91
91
this . generatedSources = new ( ) ;
92
92
var allProjects = allNonBinaryFiles . SelectFileNamesByExtension ( ".csproj" ) . ToList ( ) ;
93
93
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 ( ) ;
95
95
96
96
logger . LogInfo ( $ "Found { allFiles . Count } files, { nonGeneratedSources . Count } source files, { allProjects . Count } project files, { allSolutions . Count } solution files, { dllPaths . Count } DLLs.") ;
97
97
@@ -192,7 +192,7 @@ void exitCallback(int ret, string msg, bool silent)
192
192
] ) ;
193
193
}
194
194
195
- private HashSet < string > AddFrameworkDlls ( HashSet < string > dllPaths )
195
+ private HashSet < string > AddFrameworkDlls ( HashSet < AssemblyPath > dllPaths )
196
196
{
197
197
var frameworkLocations = new HashSet < string > ( ) ;
198
198
@@ -230,7 +230,7 @@ private HashSet<string> AddFrameworkDlls(HashSet<string> dllPaths)
230
230
continue ;
231
231
}
232
232
233
- dllPaths . UnionWith ( dlls ) ;
233
+ dllPaths . UnionWith ( dlls . Select < string , AssemblyPath > ( x => x ) ) ;
234
234
frameworkLocations . UnionWith ( dlls ) ;
235
235
}
236
236
catch ( Exception e )
@@ -284,7 +284,7 @@ private void RemoveNugetAnalyzerReferences()
284
284
}
285
285
}
286
286
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 )
288
288
{
289
289
var versionFolders = GetPackageVersionSubDirectories ( frameworkPath ) ;
290
290
if ( versionFolders . Length > 1 )
@@ -313,7 +313,7 @@ private static DirectoryInfo[] GetPackageVersionSubDirectories(string packagePat
313
313
. ToArray ( ) ;
314
314
}
315
315
316
- private void RemoveFrameworkNugetPackages ( ISet < string > dllPaths , int fromIndex = 0 )
316
+ private void RemoveFrameworkNugetPackages ( ISet < AssemblyPath > dllPaths , int fromIndex = 0 )
317
317
{
318
318
var packagesInPrioOrder = FrameworkPackageNames . NetFrameworks ;
319
319
for ( var i = fromIndex ; i < packagesInPrioOrder . Length ; i ++ )
@@ -322,7 +322,7 @@ private void RemoveFrameworkNugetPackages(ISet<string> dllPaths, int fromIndex =
322
322
}
323
323
}
324
324
325
- private void AddNetFrameworkDlls ( ISet < string > dllPaths , ISet < string > frameworkLocations )
325
+ private void AddNetFrameworkDlls ( ISet < AssemblyPath > dllPaths , ISet < string > frameworkLocations )
326
326
{
327
327
// Multiple dotnet framework packages could be present.
328
328
// 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
375
375
frameworkLocations . Add ( runtimeLocation ) ;
376
376
}
377
377
378
- private void RemoveNugetPackageReference ( string packagePrefix , ISet < string > dllPaths )
378
+ private void RemoveNugetPackageReference ( string packagePrefix , ISet < AssemblyPath > dllPaths )
379
379
{
380
380
var packageFolder = packageDirectory . DirInfo . FullName . ToLowerInvariant ( ) ;
381
381
if ( packageFolder == null )
@@ -384,7 +384,7 @@ private void RemoveNugetPackageReference(string packagePrefix, ISet<string> dllP
384
384
}
385
385
386
386
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 ) ) ;
388
388
foreach ( var path in toRemove )
389
389
{
390
390
dllPaths . Remove ( path ) ;
@@ -397,7 +397,7 @@ private bool IsAspNetCoreDetected()
397
397
return fileContent . IsNewProjectStructureUsed && fileContent . UseAspNetCoreDlls ;
398
398
}
399
399
400
- private void AddAspNetCoreFrameworkDlls ( ISet < string > dllPaths , ISet < string > frameworkLocations )
400
+ private void AddAspNetCoreFrameworkDlls ( ISet < AssemblyPath > dllPaths , ISet < string > frameworkLocations )
401
401
{
402
402
if ( ! IsAspNetCoreDetected ( ) )
403
403
{
@@ -419,7 +419,7 @@ private void AddAspNetCoreFrameworkDlls(ISet<string> dllPaths, ISet<string> fram
419
419
}
420
420
}
421
421
422
- private void AddMicrosoftWindowsDesktopDlls ( ISet < string > dllPaths , ISet < string > frameworkLocations )
422
+ private void AddMicrosoftWindowsDesktopDlls ( ISet < AssemblyPath > dllPaths , ISet < string > frameworkLocations )
423
423
{
424
424
if ( GetPackageDirectory ( FrameworkPackageNames . WindowsDesktopFramework , packageDirectory ) is string windowsDesktopApp )
425
425
{
0 commit comments