fix(dotnet): use hasChildrenHint JSON key for browse cross-client parity
Rename the anonymous-object member `hasChildren` → `hasChildrenHint` so the serialized JSON key matches the Rust and Python CLIs and the library property HasChildrenHint. Also update the text-output suffix to `hasChildrenHint=` for consistency.
This commit is contained in:
@@ -1844,7 +1844,7 @@ public static class MxGatewayClientCli
|
|||||||
string indent = new(' ', level * 2);
|
string indent = new(' ', level * 2);
|
||||||
string suffix = hasChildrenHint is null
|
string suffix = hasChildrenHint is null
|
||||||
? $"(attrs={galaxyObject.Attributes.Count})"
|
? $"(attrs={galaxyObject.Attributes.Count})"
|
||||||
: $"(attrs={galaxyObject.Attributes.Count}, hasChildren={hasChildrenHint.Value})";
|
: $"(attrs={galaxyObject.Attributes.Count}, hasChildrenHint={hasChildrenHint.Value})";
|
||||||
return $"{indent}{galaxyObject.GobjectId}\t{galaxyObject.TagName}\t{galaxyObject.BrowseName}\t{suffix}";
|
return $"{indent}{galaxyObject.GobjectId}\t{galaxyObject.TagName}\t{galaxyObject.BrowseName}\t{suffix}";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1853,7 +1853,7 @@ public static class MxGatewayClientCli
|
|||||||
return new
|
return new
|
||||||
{
|
{
|
||||||
@object = GalaxyObjectToJsonElement(node.Object),
|
@object = GalaxyObjectToJsonElement(node.Object),
|
||||||
hasChildren = node.HasChildrenHint,
|
hasChildrenHint = node.HasChildrenHint,
|
||||||
children = node.Children.Select(BrowseTreeNodeToJson).ToArray(),
|
children = node.Children.Select(BrowseTreeNodeToJson).ToArray(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user