Skip to content

Commit d2c8720

Browse files
committed
C#: Move ExitCode enum out of Extractor class.
1 parent b0c62c8 commit d2c8720

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

csharp/extractor/Semmle.Extraction.CSharp.Standalone/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public void Dispose()
5151

5252
public class Program
5353
{
54-
public static Extractor.ExitCode Run(Options options)
54+
public static ExitCode Run(Options options)
5555
{
5656
var stopwatch = new Stopwatch();
5757
stopwatch.Start();
@@ -64,7 +64,7 @@ public static Extractor.ExitCode Run(Options options)
6464
if (sourceFileCount == 0)
6565
{
6666
logger.Log(Severity.Error, "No source files found");
67-
return Extractor.ExitCode.Errors;
67+
return ExitCode.Errors;
6868
}
6969

7070
if (!options.SkipExtraction)
@@ -81,7 +81,7 @@ public static Extractor.ExitCode Run(Options options)
8181
options);
8282
logger.Log(Severity.Info, $"Extraction completed in {stopwatch.Elapsed}");
8383
}
84-
return Extractor.ExitCode.Ok;
84+
return ExitCode.Ok;
8585
}
8686

8787
public static int Main(string[] args)

csharp/extractor/Semmle.Extraction.CSharp/Extractor/Extractor.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616

1717
namespace Semmle.Extraction.CSharp
1818
{
19-
public static class Extractor
19+
public enum ExitCode
2020
{
21-
public enum ExitCode
22-
{
23-
Ok, // Everything worked perfectly
24-
Errors, // Trap was generated but there were processing errors
25-
Failed // Trap could not be generated
26-
}
21+
Ok, // Everything worked perfectly
22+
Errors, // Trap was generated but there were processing errors
23+
Failed // Trap could not be generated
24+
}
2725

26+
public static class Extractor
27+
{
2828
private class LogProgressMonitor : IProgressMonitor
2929
{
3030
private readonly ILogger logger;

0 commit comments

Comments
 (0)