C#: Move ExitCode enum out of Extractor class.

This commit is contained in:
Michael Nebel
2022-02-23 14:37:34 +01:00
parent b0c62c8a10
commit d2c872079b
2 changed files with 10 additions and 10 deletions

View File

@@ -51,7 +51,7 @@ namespace Semmle.Extraction.CSharp.Standalone
public class Program
{
public static Extractor.ExitCode Run(Options options)
public static ExitCode Run(Options options)
{
var stopwatch = new Stopwatch();
stopwatch.Start();
@@ -64,7 +64,7 @@ namespace Semmle.Extraction.CSharp.Standalone
if (sourceFileCount == 0)
{
logger.Log(Severity.Error, "No source files found");
return Extractor.ExitCode.Errors;
return ExitCode.Errors;
}
if (!options.SkipExtraction)
@@ -81,7 +81,7 @@ namespace Semmle.Extraction.CSharp.Standalone
options);
logger.Log(Severity.Info, $"Extraction completed in {stopwatch.Elapsed}");
}
return Extractor.ExitCode.Ok;
return ExitCode.Ok;
}
public static int Main(string[] args)

View File

@@ -16,15 +16,15 @@ using System.Threading;
namespace Semmle.Extraction.CSharp
{
public enum ExitCode
{
Ok, // Everything worked perfectly
Errors, // Trap was generated but there were processing errors
Failed // Trap could not be generated
}
public static class Extractor
{
public enum ExitCode
{
Ok, // Everything worked perfectly
Errors, // Trap was generated but there were processing errors
Failed // Trap could not be generated
}
private class LogProgressMonitor : IProgressMonitor
{
private readonly ILogger logger;