Fixed Warnings

This commit is contained in:
Matthias Heil
2026-04-05 08:00:09 +02:00
parent dfb879bfb3
commit 511a5f9f51
21 changed files with 104 additions and 115 deletions
@@ -41,13 +41,25 @@ public static class LoggerExtensions
public static void TestPattern(this ILogger logger, EventId eventId)
{
Exception exception = new Exception("Test Error Message");
Exception exception = new InvalidDataException("Test Error Message");
#pragma warning disable CA1848 // Use the LoggerMessage delegates
logger.Emit(eventId, LogLevel.Trace, "Trace Test Pattern");
#pragma warning restore CA1848 // Use the LoggerMessage delegates
#pragma warning disable CA1848 // Use the LoggerMessage delegates
logger.Emit(eventId, LogLevel.Debug, "Debug Test Pattern");
#pragma warning restore CA1848 // Use the LoggerMessage delegates
#pragma warning disable CA1848 // Use the LoggerMessage delegates
logger.Emit(eventId, LogLevel.Information, "Information Test Pattern");
#pragma warning restore CA1848 // Use the LoggerMessage delegates
#pragma warning disable CA1848 // Use the LoggerMessage delegates
logger.Emit(eventId, LogLevel.Warning, "Warning Test Pattern");
#pragma warning restore CA1848 // Use the LoggerMessage delegates
#pragma warning disable CA1848 // Use the LoggerMessage delegates
logger.Emit(eventId, LogLevel.Error, "Error Test Pattern", exception);
#pragma warning restore CA1848 // Use the LoggerMessage delegates
#pragma warning disable CA1848 // Use the LoggerMessage delegates
logger.Emit(eventId, LogLevel.Critical, "Critical Test Pattern", exception);
#pragma warning restore CA1848 // Use the LoggerMessage delegates
}
}
@@ -1,6 +0,0 @@
namespace LogViewer.Core;
public interface ILogDataStoreImpl
{
public ILogDataStore DataStore { get; }
}
@@ -2,7 +2,7 @@
namespace LogViewer.Core.ViewModels;
public class LogViewerControlViewModel : ViewModel, ILogDataStoreImpl
public class LogViewerControlViewModel : ViewModel, ILogDataStoreCore
{
#region Constructor