mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
introduce object type property to node (#1614)
This commit is contained in:
@@ -58,5 +58,10 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Contracts
|
||||
/// Error message returned from the engine for a object explorer node failure reason, if any.
|
||||
/// </summary>
|
||||
public string ErrorMessage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The object type of the node. e.g. Database, Server, Tables...
|
||||
/// </summary>
|
||||
public string ObjectType { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,8 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes
|
||||
/// <summary>
|
||||
/// The name of this object as included in its node path
|
||||
/// </summary>
|
||||
public string NodePathName {
|
||||
public string NodePathName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrEmpty(nodePathName))
|
||||
@@ -123,10 +124,11 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes
|
||||
/// for many nodes such as the server, the display label will be different
|
||||
/// to the value.
|
||||
/// </summary>
|
||||
public string Label {
|
||||
public string Label
|
||||
{
|
||||
get
|
||||
{
|
||||
if(label == null)
|
||||
if (label == null)
|
||||
{
|
||||
return NodeValue;
|
||||
}
|
||||
@@ -229,7 +231,8 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes
|
||||
Metadata = this.ObjectMetadata,
|
||||
NodeStatus = this.NodeStatus,
|
||||
NodeSubType = this.NodeSubType,
|
||||
ErrorMessage = this.ErrorMessage
|
||||
ErrorMessage = this.ErrorMessage,
|
||||
ObjectType = this.NodeTypeId.ToString()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user