diff --git a/ProjectLighthouse/Serialization/LbpSerializer.cs b/ProjectLighthouse/Serialization/LbpSerializer.cs index 9bec4cb2..29fc17fd 100644 --- a/ProjectLighthouse/Serialization/LbpSerializer.cs +++ b/ProjectLighthouse/Serialization/LbpSerializer.cs @@ -26,6 +26,11 @@ namespace LBPUnion.ProjectLighthouse.Serialization public static string TaggedStringElement(string key, object value, string tagKey, object tagValue) => $"<{key} {tagKey}=\"{tagValue}\">{value}"; + public static string TaggedStringElement(string key, object value, Dictionary attrKeyValuePairs) + => $"<{key} " + + Enumerable.Aggregate(attrKeyValuePairs, string.Empty, (current, kvp) => current + $"{kvp.Key}=\"{kvp.Value}\" ") + + $">{value}"; + public static string Elements (params KeyValuePair[] pairs) => pairs.Aggregate(string.Empty, (current, pair) => current + StringElement(pair));