Skip to content

Commit f16aa03

Browse files
committed
Code quality improvement
1 parent 7a8d83e commit f16aa03

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/DependencyManager.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,14 @@ private void RemoveNugetPackageReference(string packagePrefix, ISet<string> dllP
334334
}
335335
}
336336

337+
private bool IsAspNetCoreDetected()
338+
{
339+
return fileContent.IsNewProjectStructureUsed && fileContent.UseAspNetCoreDlls;
340+
}
341+
337342
private void AddAspNetCoreFrameworkDlls(ISet<string> dllPaths, ISet<string> frameworkLocations)
338343
{
339-
if (!fileContent.IsNewProjectStructureUsed || !fileContent.UseAspNetCoreDlls)
344+
if (!IsAspNetCoreDetected())
340345
{
341346
return;
342347
}
@@ -445,7 +450,7 @@ private void GenerateSourceFilesFromWebViews(List<FileInfo> allFiles)
445450

446451
logger.LogInfo($"Found {views.Length} cshtml and razor files.");
447452

448-
if (!fileContent.IsNewProjectStructureUsed)
453+
if (!IsAspNetCoreDetected())
449454
{
450455
logger.LogInfo("Generating source files from cshtml files is only supported for new (SDK-style) project files");
451456
return;

0 commit comments

Comments
 (0)