Expose parent node path of tree node (#1949)

* expose parent node path

* add comments
This commit is contained in:
Alan Ren
2023-03-17 11:11:40 -07:00
committed by GitHub
parent ce731f7fe4
commit dbe06a50d5
2 changed files with 7 additions and 0 deletions

View File

@@ -25,6 +25,12 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Contracts
/// </summary>
public string NodePath { get; set; }
/// <summary>
/// The path of the parent node. This is going to be used by the client side to determine the parent node.
/// We are not referencing the parent node directly because the information needs to be passed between processes.
/// </summary>
public string ParentNodePath { get; set; }
/// <summary>
/// The type of the node - for example Server, Database, Folder, Table
/// </summary>

View File

@@ -229,6 +229,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes
IsLeaf = this.IsAlwaysLeaf,
Label = this.Label,
NodePath = this.GetNodePath(),
ParentNodePath = this.Parent?.GetNodePath() ?? "",
NodeType = this.NodeType,
Metadata = this.ObjectMetadata,
NodeStatus = this.NodeStatus,