mirror of
https://github.com/claunia/romrepomgr.git
synced 2025-12-16 11:14:45 +00:00
General refactor and cleanup.
This commit is contained in:
@@ -14,23 +14,27 @@ public class SerilogSink(LogEventLevel minimumLevel, IList<string>? areas = null
|
||||
public void Log(LogEventLevel level, string area, object? source, string messageTemplate)
|
||||
{
|
||||
if(IsEnabled(level, area))
|
||||
{
|
||||
Serilog.Log.Write(LogLevelToSerilogLevel(level),
|
||||
"[{Area} {Source}] {MessageTemplate}",
|
||||
area,
|
||||
source,
|
||||
messageTemplate);
|
||||
}
|
||||
}
|
||||
|
||||
public void Log(LogEventLevel level, string area, object? source, string messageTemplate,
|
||||
params object?[] propertyValues)
|
||||
{
|
||||
if(IsEnabled(level, area))
|
||||
{
|
||||
Serilog.Log.Write(LogLevelToSerilogLevel(level),
|
||||
"[{Area} {Source}] {MessageTemplate}",
|
||||
propertyValues,
|
||||
area,
|
||||
source,
|
||||
messageTemplate);
|
||||
}
|
||||
}
|
||||
|
||||
private static Serilog.Events.LogEventLevel LogLevelToSerilogLevel(LogEventLevel level)
|
||||
|
||||
@@ -95,9 +95,9 @@ public sealed partial class ExportDatViewModel : ViewModelBase
|
||||
ProgressVisible = true;
|
||||
StatusMessage = Localization.DecompressingDat;
|
||||
|
||||
var sha384Bytes = new byte[48];
|
||||
byte[] sha384Bytes = new byte[48];
|
||||
|
||||
for(var i = 0; i < 48; i++)
|
||||
for(int i = 0; i < 48; i++)
|
||||
{
|
||||
if(_datHash[i * 2] >= 0x30 && _datHash[i * 2] <= 0x39)
|
||||
sha384Bytes[i] = (byte)((_datHash[i * 2] - 0x30) * 0x10);
|
||||
|
||||
@@ -76,10 +76,10 @@ public sealed partial class RemoveDatViewModel : ViewModelBase
|
||||
|
||||
Dispatcher.UIThread.Post(() => StatusMessage = Localization.RemovingDatFileFromRepo);
|
||||
|
||||
var sha384Bytes = new byte[48];
|
||||
byte[] sha384Bytes = new byte[48];
|
||||
string sha384 = romSet.Sha384;
|
||||
|
||||
for(var i = 0; i < 48; i++)
|
||||
for(int i = 0; i < 48; i++)
|
||||
{
|
||||
if(sha384[i * 2] >= 0x30 && sha384[i * 2] <= 0x39)
|
||||
sha384Bytes[i] = (byte)((sha384[i * 2] - 0x30) * 0x10);
|
||||
|
||||
Reference in New Issue
Block a user