Skip to content

Commit

Permalink
Move extraction context classes to the Semmle.Extraction.CSharp names…
Browse files Browse the repository at this point in the history
…pace
  • Loading branch information
tamasvajk committed Nov 13, 2024
1 parent b7098b7 commit 46da596
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Microsoft.CodeAnalysis;
using Semmle.Util.Logging;

namespace Semmle.Extraction
namespace Semmle.Extraction.CSharp
{
public class BinaryLogExtractionContext : ExtractionContext
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Semmle.Util.Logging;
using CompilationInfo = (string key, string value);

namespace Semmle.Extraction
namespace Semmle.Extraction.CSharp
{
/// <summary>
/// Implementation of the main extractor state.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Semmle.Extraction
namespace Semmle.Extraction.CSharp
{
/// <summary>
/// The mode in which a file is extracted.
Expand Down
8 changes: 4 additions & 4 deletions csharp/extractor/Semmle.Extraction.CSharp/_Base/Context.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class Context
/// <summary>
/// Access various extraction functions, e.g. logger, trap writer.
/// </summary>
public ExtractionContext ExtractionContext { get; }
public CSharp.ExtractionContext ExtractionContext { get; }

/// <summary>
/// Access to the trap file.
Expand Down Expand Up @@ -190,7 +190,7 @@ public void PopulateAll()
}
}

protected Context(ExtractionContext extractionContext, TrapWriter trapWriter, bool shouldAddAssemblyTrapPrefix = false)
protected Context(CSharp.ExtractionContext extractionContext, TrapWriter trapWriter, bool shouldAddAssemblyTrapPrefix = false)
{
ExtractionContext = extractionContext;
TrapWriter = trapWriter;
Expand Down Expand Up @@ -274,7 +274,7 @@ private void Populate(ISymbol? optionalSymbol, CachedEntity entity)

bool duplicationGuard, deferred;

if (ExtractionContext.Mode is ExtractorMode.Standalone)
if (ExtractionContext.Mode is CSharp.ExtractorMode.Standalone)
{
duplicationGuard = false;
deferred = false;
Expand Down Expand Up @@ -408,7 +408,7 @@ private void ExtractionError(InternalError error)

private void ReportError(InternalError error)
{
if (!ExtractionContext.Mode.HasFlag(ExtractorMode.Standalone))
if (!ExtractionContext.Mode.HasFlag(CSharp.ExtractorMode.Standalone))
throw error;

ExtractionError(error);
Expand Down

0 comments on commit 46da596

Please sign in to comment.