HelperNuget

This commit is contained in:
2024-04-18 09:11:39 -07:00
parent 135f236b8c
commit 4eb70db231
10 changed files with 283 additions and 2 deletions

View File

@ -223,6 +223,7 @@ public class DCP
level += 1;
foreach (dynamic entry in expandoObject)
{
#pragma warning disable IL2026, IL3050
if (entry.Value is ExpandoObject)
TextResolveEntry(result, entry.Value, level, string.Concat(super, " : ", entry.Key), i, group);
else
@ -262,6 +263,7 @@ public class DCP
i = null;
}
}
#pragma warning restore IL2026, IL3050
}
level -= 1;
if (level == 0)
@ -273,6 +275,7 @@ public class DCP
StringBuilder result = new();
if (result.Length > 0) //Skipping because System.Text.Json changed the way Expando works
{
#pragma warning disable IL2026, IL3050
string title = string.Concat(Path.GetFileName(edaObjectFile), " - ", common.Source);
dynamic? expandoObject = JsonSerializer.Deserialize<ExpandoObject>(json);
_ = result.AppendLine(title);
@ -288,6 +291,7 @@ public class DCP
_ = result.AppendLine(edaObjectFile);
_ = result.AppendLine();
TextResolveEntry(result, expandoObject, 0, string.Empty, null, group: true);
#pragma warning restore IL2026, IL3050
}
return result.ToString();
}