Skip to content

Commit 3f2a590

Browse files
committed
C#: Rename new project structure to SDK project structure.
1 parent cb5a682 commit 3f2a590

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ private void AddNetFrameworkDlls(ISet<AssemblyLookupLocation> dllLocations, ISet
295295

296296
string? runtimeLocation = null;
297297

298-
if (fileContent.IsNewProjectStructureUsed)
298+
if (fileContent.IsSdkProjectStructureUsed)
299299
{
300300
runtimeLocation = Runtime.NetCoreRuntime;
301301
}

‎csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/FileContent.cs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public bool IsAspNetCoreDetected
5454
{
5555
get
5656
{
57-
return IsNewProjectStructureUsed && UseAspNetCoreDlls;
57+
return IsSdkProjectStructureUsed && UseAspNetCoreDlls;
5858
}
5959
}
6060

@@ -102,13 +102,13 @@ public bool IsLegacyProjectStructureUsed
102102
}
103103
}
104104

105-
private bool isNewProjectStructureUsed = false;
106-
public bool IsNewProjectStructureUsed
105+
private bool isSdkProjectStructureUsed = false;
106+
public bool IsSdkProjectStructureUsed
107107
{
108108
get
109109
{
110110
initialize.Run();
111-
return isNewProjectStructureUsed;
111+
return isSdkProjectStructureUsed;
112112
}
113113
}
114114

@@ -228,7 +228,7 @@ private void DoInitialize()
228228

229229
// Determine project structure:
230230
isLegacyProjectStructureUsed = isLegacyProjectStructureUsed || MicrosoftCSharpTargets().IsMatch(line);
231-
isNewProjectStructureUsed = isNewProjectStructureUsed
231+
isSdkProjectStructureUsed = isSdkProjectStructureUsed
232232
|| ProjectSdk().IsMatch(line)
233233
|| FrameworkReference().IsMatch(line);
234234
// TODO: we could also check `<Sdk Name="Microsoft.NET.Sdk" />`
@@ -243,7 +243,7 @@ private void DoInitialize()
243243

244244
logger.LogInfo("Finished reading project files.");
245245
logger.LogInfo($"Legacy project structure usage detected: {isLegacyProjectStructureUsed}");
246-
logger.LogInfo($"New project structure usage detected: {isNewProjectStructureUsed}");
246+
logger.LogInfo($"SDK project structure usage detected: {isSdkProjectStructureUsed}");
247247
logger.LogInfo($"ASP.NET usage detected: {useAspNetCoreDlls}");
248248
logger.LogInfo($"Windows Forms usage detected: {useWindowsForms}");
249249
logger.LogInfo($"WPF usage detected: {useWpf}");

‎csharp/extractor/Semmle.Extraction.CSharp.DependencyFetching/SourceGenerators/DotnetSourceGeneratorBase.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected override IEnumerable<string> Run()
3939
return [];
4040
}
4141

42-
if (!fileContent.IsNewProjectStructureUsed)
42+
if (!fileContent.IsSdkProjectStructureUsed)
4343
{
4444
logger.LogInfo($"Generating source files from {FileType} files is only supported for new (SDK-style) project files");
4545
return [];

‎csharp/extractor/Semmle.Extraction.Tests/FileContent.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public void TestFileContent_LegacyProjectStructure()
179179

180180
// Execute
181181
var isLegacy = fileContent.IsLegacyProjectStructureUsed;
182-
var isNew = fileContent.IsNewProjectStructureUsed;
182+
var isNew = fileContent.IsSdkProjectStructureUsed;
183183

184184
// Verify
185185
Assert.True(isLegacy);
@@ -204,7 +204,7 @@ public void TestFileContent_NewProjectStructure()
204204

205205
// Execute
206206
var isLegacy = fileContent.IsLegacyProjectStructureUsed;
207-
var isNew = fileContent.IsNewProjectStructureUsed;
207+
var isNew = fileContent.IsSdkProjectStructureUsed;
208208

209209
// Verify
210210
Assert.True(isNew);

0 commit comments

Comments
 (0)