-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dependabot/bundler/docs/nokogiri-1.18.3
- Loading branch information
Showing
42 changed files
with
394 additions
and
267 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Microsoft.Extensions.Logging; | ||
using Musoq.Converter; | ||
|
||
namespace Musoq.Benchmarks.Components; | ||
|
||
public class BenchmarkLoggerResolver : ILoggerResolver | ||
{ | ||
public ILogger ResolveLogger() | ||
{ | ||
return new EmptyLogger<object>(); | ||
} | ||
|
||
public ILogger<T> ResolveLogger<T>() | ||
{ | ||
return new EmptyLogger<T>(); | ||
} | ||
|
||
private class EmptyLogger<T> : ILogger<T> | ||
{ | ||
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception? exception, Func<TState, Exception?, string> formatter) | ||
{ | ||
} | ||
|
||
public bool IsEnabled(LogLevel logLevel) | ||
{ | ||
return false; | ||
} | ||
|
||
public IDisposable? BeginScope<TState>(TState state) where TState : notnull | ||
{ | ||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using Microsoft.Extensions.Logging; | ||
using Moq; | ||
|
||
namespace Musoq.Converter.Tests.Components; | ||
|
||
public class TestsLoggerResolver : ILoggerResolver | ||
{ | ||
public ILogger ResolveLogger() | ||
{ | ||
var logger = new Mock<ILogger>(); | ||
|
||
return logger.Object; | ||
} | ||
|
||
public ILogger<T> ResolveLogger<T>() | ||
{ | ||
var logger = new Mock<ILogger<T>>(); | ||
|
||
return logger.Object; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace Musoq.Converter; | ||
|
||
public interface ILoggerResolver | ||
{ | ||
public ILogger ResolveLogger(); | ||
|
||
public ILogger<T> ResolveLogger<T>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using Microsoft.Extensions.Logging; | ||
using Moq; | ||
using Musoq.Converter; | ||
|
||
namespace Musoq.Evaluator.Tests.Components; | ||
|
||
public class TestsLoggerResolver : ILoggerResolver | ||
{ | ||
public ILogger ResolveLogger() | ||
{ | ||
var loggerMock = new Mock<ILogger>(); | ||
|
||
return loggerMock.Object; | ||
} | ||
|
||
public ILogger<T> ResolveLogger<T>() | ||
{ | ||
var loggerMock = new Mock<ILogger<T>>(); | ||
|
||
return loggerMock.Object; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.