From 00e2b0c01b4065dfae8880b10d4c2eb882b87bbc Mon Sep 17 00:00:00 2001 From: antoineatstariongroup Date: Thu, 5 Dec 2024 13:52:30 +0100 Subject: [PATCH] refactor base values assignment --- EA-ModelKit/Model/Export/ExportableElement.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/EA-ModelKit/Model/Export/ExportableElement.cs b/EA-ModelKit/Model/Export/ExportableElement.cs index 36a705d..2ac9aef 100644 --- a/EA-ModelKit/Model/Export/ExportableElement.cs +++ b/EA-ModelKit/Model/Export/ExportableElement.cs @@ -48,9 +48,12 @@ public ExportableElement(SlimElement element, IReadOnlyList taggedValues this.KindName = element.ElementKind; this.Headers = [..this.baseHeaders, ..taggedValuesToExport]; - this.ExportableValues[this.baseHeaders[0]] = element.Name; - this.ExportableValues[this.baseHeaders[1]] = element.Alias; - this.ExportableValues[this.baseHeaders[2]] = WebUtility.HtmlDecode(element.Notes); + var values = new List {element.Name, element.Alias,WebUtility.HtmlDecode(element.Notes)}; + + for(var baseHeaderIndex = 0;baseHeaderIndex < this.baseHeaders.Length;baseHeaderIndex++) + { + this.ExportableValues[this.baseHeaders[baseHeaderIndex]] = values[baseHeaderIndex]; + } foreach (var taggedValueToExport in taggedValuesToExport) {