From dc5e6ca147aa9912c2895635cf97e08d57de8850 Mon Sep 17 00:00:00 2001 From: Lior Banai Date: Mon, 23 Oct 2023 17:13:15 +0300 Subject: [PATCH] update get mapping --- .../ColumnsMatcherUC.cs | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/Analogy.LogViewer.NLogProvider/ColumnsMatcherUC.cs b/Analogy.LogViewer.NLogProvider/ColumnsMatcherUC.cs index f1ba43b..d56068f 100644 --- a/Analogy.LogViewer.NLogProvider/ColumnsMatcherUC.cs +++ b/Analogy.LogViewer.NLogProvider/ColumnsMatcherUC.cs @@ -50,19 +50,18 @@ private Dictionary GetMapping() { Dictionary maps = new(11) { - { decimal.ToInt32(nudDate.Value), AnalogyLogMessagePropertyName.Date }, - { decimal.ToInt32(nudLevel.Value), AnalogyLogMessagePropertyName.Level }, - { decimal.ToInt32(nudText.Value), AnalogyLogMessagePropertyName.Text }, - { decimal.ToInt32(nudSource.Value), AnalogyLogMessagePropertyName.Source }, - { decimal.ToInt32(nudProcessName.Value), AnalogyLogMessagePropertyName.Module }, - { decimal.ToInt32(nudProcessId.Value), AnalogyLogMessagePropertyName.ProcessId }, - { decimal.ToInt32(nudMachineName.Value), AnalogyLogMessagePropertyName.MachineName }, - { decimal.ToInt32(nudUserName.Value), AnalogyLogMessagePropertyName.User }, - { decimal.ToInt32(nudFileName.Value), AnalogyLogMessagePropertyName.FileName }, - { decimal.ToInt32(nudMethodName.Value), AnalogyLogMessagePropertyName.MethodName }, - { decimal.ToInt32(nudLineNumber.Value), AnalogyLogMessagePropertyName.LineNumber }, + [decimal.ToInt32(nudDate.Value)] = AnalogyLogMessagePropertyName.Date, + [decimal.ToInt32(nudLevel.Value)] = AnalogyLogMessagePropertyName.Level, + [decimal.ToInt32(nudText.Value)] = AnalogyLogMessagePropertyName.Text, + [decimal.ToInt32(nudSource.Value)] = AnalogyLogMessagePropertyName.Source, + [decimal.ToInt32(nudProcessName.Value)] = AnalogyLogMessagePropertyName.Module, + [decimal.ToInt32(nudProcessId.Value)] = AnalogyLogMessagePropertyName.ProcessId, + [decimal.ToInt32(nudMachineName.Value)] = AnalogyLogMessagePropertyName.MachineName, + [decimal.ToInt32(nudUserName.Value)] = AnalogyLogMessagePropertyName.User, + [decimal.ToInt32(nudFileName.Value)] = AnalogyLogMessagePropertyName.FileName, + [decimal.ToInt32(nudMethodName.Value)] = AnalogyLogMessagePropertyName.MethodName, + [decimal.ToInt32(nudLineNumber.Value)] = AnalogyLogMessagePropertyName.LineNumber }; - return maps; } }