Implements mapping of debug/info routing table nodes

This commit is contained in:
benbierens 2024-06-07 16:37:31 +02:00
parent 3a61fc89c6
commit 18a02b1717
No known key found for this signature in database
GPG Key ID: 877D2C2E09A22F3A
1 changed files with 11 additions and 1 deletions

View File

@ -110,7 +110,7 @@ namespace CodexPlugin
return new DebugInfoTable
{
LocalNode = MapDebugInfoTableNode(obj.GetValue("localNode")),
Nodes = new DebugInfoTableNode[0]
Nodes = MapDebugInfoTableNodeArray(obj.GetValue("nodes") as JArray)
};
}
@ -129,6 +129,16 @@ namespace CodexPlugin
};
}
private DebugInfoTableNode[] MapDebugInfoTableNodeArray(JArray? nodes)
{
if (nodes == null || nodes.Count == 0)
{
return new DebugInfoTableNode[0];
}
return nodes.Select(MapDebugInfoTableNode).ToArray();
}
private Manifest MapManifest(CodexOpenApi.ManifestItem manifest)
{
return new Manifest