Skip to content

Commit 02bd204

Browse files
committed
Move more classes to the Semmle.Extraction.CSharp namespace
1 parent 46da596 commit 02bd204

32 files changed

+59
-148
lines changed

csharp/extractor/Semmle.Extraction.CSharp/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ codeql_csharp_library(
77
name = "Semmle.Extraction.CSharp",
88
srcs = glob([
99
"_Base/**/*.cs",
10+
"CodeAnalysisExtensions/**/*.cs",
1011
"Comments/**/*.cs",
1112
"Entities/**/*.cs",
1213
"Extractor/**/*.cs",
1314
"Kinds/**/*.cs",
1415
"Populators/**/*.cs",
16+
"Trap/**/*.cs",
1517
"*.cs",
1618
]),
1719
allow_unsafe_blocks = True,

csharp/extractor/Semmle.Extraction.CSharp/_Base/LocationExtensions.cs renamed to csharp/extractor/Semmle.Extraction.CSharp/CodeAnalysisExtensions/LocationExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Linq;
44
using Microsoft.CodeAnalysis;
55

6-
namespace Semmle.Extraction
6+
namespace Semmle.Extraction.CSharp
77
{
88
public static class LocationExtensions
99
{

csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/CachedEntityFactory.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ namespace Semmle.Extraction
33
/// <summary>
44
/// A factory for creating cached entities.
55
/// </summary>
6-
public abstract class CachedEntityFactory<TInit, TEntity> where TEntity : CachedEntity
6+
public abstract class CachedEntityFactory<TInit, TEntity> where TEntity : Semmle.Extraction.CachedEntity
77
{
88
/// <summary>
99
/// Initializes the entity, but does not generate any trap code.
1010
/// </summary>
11-
public abstract TEntity Create(Context cx, TInit init);
11+
public abstract TEntity Create(Semmle.Extraction.Context cx, TInit init);
1212
}
1313
}

csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/CachedEntity`1.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Semmle.Extraction
99
///
1010
/// The <see cref="Entity.Id"/> property is used as label in caching.
1111
/// </summary>
12-
public abstract class CachedEntity : LabelledEntity
12+
public abstract class CachedEntity : CSharp.LabelledEntity
1313
{
1414
protected CachedEntity(Context context) : base(context)
1515
{
@@ -62,7 +62,7 @@ public override bool Equals(object? obj)
6262
return other?.GetType() == GetType() && Equals(other.Symbol, Symbol);
6363
}
6464

65-
public override TrapStackBehaviour TrapStackBehaviour => TrapStackBehaviour.NoLabel;
65+
public override CSharp.TrapStackBehaviour TrapStackBehaviour => CSharp.TrapStackBehaviour.NoLabel;
6666
}
6767

6868
/// <summary>

csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/Entity.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.IO;
33
using Microsoft.CodeAnalysis;
4+
using Semmle.Extraction.CSharp;
45

56
namespace Semmle.Extraction
67
{

csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/FreshEntity.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Semmle.Extraction
55
/// <summary>
66
/// An entity which has a default "*" ID assigned to it.
77
/// </summary>
8-
public abstract class FreshEntity : UnlabelledEntity
8+
public abstract class FreshEntity : CSharp.UnlabelledEntity
99
{
1010
protected FreshEntity(Context cx) : base(cx)
1111
{
@@ -33,6 +33,6 @@ public string DebugContents
3333

3434
public override Microsoft.CodeAnalysis.Location? ReportingLocation => null;
3535

36-
public override TrapStackBehaviour TrapStackBehaviour => TrapStackBehaviour.NoLabel;
36+
public override CSharp.TrapStackBehaviour TrapStackBehaviour => CSharp.TrapStackBehaviour.NoLabel;
3737
}
3838
}

csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/IEntity.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.IO;
22
using Microsoft.CodeAnalysis;
33

4-
namespace Semmle.Extraction
4+
namespace Semmle.Extraction.CSharp
55
{
66
/// <summary>
77
/// Any program entity which has a corresponding label in the trap file.

csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/LabelledEntity.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
namespace Semmle.Extraction
1+
namespace Semmle.Extraction.CSharp
22
{
3-
public abstract class LabelledEntity : Entity
3+
public abstract class LabelledEntity : Semmle.Extraction.Entity
44
{
5-
protected LabelledEntity(Context cx) : base(cx)
5+
protected LabelledEntity(Semmle.Extraction.Context cx) : base(cx)
66
{
77
}
88
}

csharp/extractor/Semmle.Extraction.CSharp/Entities/Base/UnlabelledEntity.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
namespace Semmle.Extraction
1+
namespace Semmle.Extraction.CSharp
22
{
33
public abstract class UnlabelledEntity : Entity
44
{
5-
protected UnlabelledEntity(Context cx) : base(cx)
5+
protected UnlabelledEntity(Extraction.Context cx) : base(cx)
66
{
77
cx.AddFreshLabel(this);
88
}

0 commit comments

Comments
 (0)