// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // using Microsoft.SqlTools.DataProtocol.Contracts.Metadata; namespace Microsoft.SqlTools.DataProtocol.Contracts.Explorer { /// /// Information describing a Node in the Object Explorer tree. /// Contains information required to display the Node to the user and /// to know whether actions such as expanding children is possible /// the node /// public class NodeInfo { /// /// Path identifying this node: for example a table will be at ["server", "database", "tables", "tableName"]. /// This enables rapid navigation of the tree without the need for a global registry of elements. /// The path functions as a unique ID and is used to disambiguate the node when sending requests for expansion. /// A common ID is needed since processes do not share address space and need a unique identifier /// public string NodePath { get; set; } /// /// The type of the node - for example Server, Database, Folder, Table /// public string NodeType { get; set; } /// /// Label to display to the user, describing this node. /// public string Label { get; set; } /// /// Node Sub type - for example a key can have type as "Key" and sub type as "PrimaryKey" /// public string NodeSubType { get; set; } /// /// Node status - for example login can be disabled/enabled /// public string NodeStatus { get; set; } /// /// Is this a leaf node (in which case no children can be generated) or /// is it expandable? /// public bool IsLeaf { get; set; } /// /// Object Metadata for smo objects to be used for scripting /// public ObjectMetadata Metadata { get; set; } /// /// Error message returned from the engine for a object explorer node failure reason, if any. /// public string ErrorMessage { get; set; } } }