Skip to content

Commit 2c72d7e

Browse files
committed
C#: Improve code quality
1 parent 2333b8d commit 2c72d7e

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

csharp/extractor/Semmle.Extraction.CIL.Driver/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public static void Main(string[] args)
3838
}
3939

4040
var options = new ExtractorOptions(args);
41-
using var logger = new ConsoleLogger(options.Verbosity, logThreadId: false);
41+
using ILogger logger = new ConsoleLogger(options.Verbosity, logThreadId: false);
4242

4343
var actions = options.AssembliesToExtract
4444
.Select(asm => asm.Filename)

csharp/extractor/Semmle.Util/Logger.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,8 @@ public interface ILogger : IDisposable
4646
void LogInfo(string text, int? threadId = null) => Log(Severity.Info, text, threadId);
4747

4848
void LogDebug(string text, int? threadId = null) => Log(Severity.Debug, text, threadId);
49-
}
5049

51-
public static class LoggerExtensions
52-
{
53-
/// <summary>
54-
/// Log the given text with the given severity.
55-
/// </summary>
56-
public static void Log(this ILogger logger, Severity s, string text, params object?[] args)
57-
{
58-
logger.Log(s, string.Format(text, args));
59-
}
50+
void Log(Severity s, string text, params object?[] args) => Log(s, string.Format(text, args));
6051
}
6152

6253
/// <summary>

0 commit comments

Comments
 (0)