@@ -23,7 +23,8 @@ public sealed class DependencyManager : IDisposable
23
23
private readonly IDictionary < string , string > unresolvedReferences = new ConcurrentDictionary < string , string > ( ) ;
24
24
private int failedProjects ;
25
25
private int succeededProjects ;
26
- private readonly List < string > allSources ;
26
+ private readonly List < string > nonGeneratedSources ;
27
+ private readonly List < string > generatedSources ;
27
28
private int conflictedReferences = 0 ;
28
29
private readonly IDependencyOptions options ;
29
30
private readonly DirectoryInfo sourceDir ;
@@ -65,7 +66,8 @@ public DependencyManager(string srcDir, IDependencyOptions options, ILogger logg
65
66
var allNonBinaryFiles = allFiles . Where ( f => ! binaryFileExtensions . Contains ( f . Extension . ToLowerInvariant ( ) ) ) . ToList ( ) ;
66
67
var smallNonBinaryFiles = allNonBinaryFiles . SelectSmallFiles ( progressMonitor ) . SelectFileNames ( ) ;
67
68
this . fileContent = new FileContent ( progressMonitor , smallNonBinaryFiles ) ;
68
- this . allSources = allNonBinaryFiles . SelectFileNamesByExtension ( ".cs" ) . ToList ( ) ;
69
+ this . nonGeneratedSources = allNonBinaryFiles . SelectFileNamesByExtension ( ".cs" ) . ToList ( ) ;
70
+ this . generatedSources = new ( ) ;
69
71
var allProjects = allNonBinaryFiles . SelectFileNamesByExtension ( ".csproj" ) ;
70
72
var solutions = options . SolutionFile is not null
71
73
? new [ ] { options . SolutionFile }
@@ -219,7 +221,7 @@ private void GenerateSourceFileFromImplicitUsings()
219
221
}
220
222
}
221
223
222
- this . allSources . Add ( path ) ;
224
+ this . generatedSources . Add ( path ) ;
223
225
}
224
226
}
225
227
@@ -241,7 +243,7 @@ private void GenerateSourceFilesFromWebViews(List<FileInfo> allFiles)
241
243
var razor = new Razor ( sdk , dotnet , progressMonitor ) ;
242
244
var targetDir = GetTemporaryWorkingDirectory ( "razor" ) ;
243
245
var generatedFiles = razor . GenerateFiles ( views , usedReferences . Keys , targetDir ) ;
244
- this . allSources . AddRange ( generatedFiles ) ;
246
+ this . generatedSources . AddRange ( generatedFiles ) ;
245
247
}
246
248
catch ( Exception ex )
247
249
{
@@ -384,10 +386,15 @@ private void ResolveConflicts()
384
386
/// </summary>
385
387
public IEnumerable < string > ProjectSourceFiles => sources . Where ( s => s . Value ) . Select ( s => s . Key ) ;
386
388
389
+ /// <summary>
390
+ /// All of the generated source files in the source directory.
391
+ /// </summary>
392
+ public IEnumerable < string > GeneratedSourceFiles => generatedSources ;
393
+
387
394
/// <summary>
388
395
/// All of the source files in the source directory.
389
396
/// </summary>
390
- public IEnumerable < string > AllSourceFiles => allSources ;
397
+ public IEnumerable < string > AllSourceFiles => generatedSources . Concat ( nonGeneratedSources ) ;
391
398
392
399
/// <summary>
393
400
/// List of assembly IDs which couldn't be resolved.
0 commit comments