mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-17 01:25:40 -05:00
Override GetNodePathName for custom-named table nodes (#601)
This commit is contained in:
committed by
Matt Irvine
parent
167948256c
commit
bd11fd2129
@@ -62,6 +62,11 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
public override string GetNodePathName(object smoObject)
|
||||
{
|
||||
return TableCustomNodeHelper.GetPathName(smoObject);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -79,5 +84,24 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
public override string GetNodePathName(object smoObject)
|
||||
{
|
||||
return TableCustomNodeHelper.GetPathName(smoObject);
|
||||
}
|
||||
}
|
||||
|
||||
internal static class TableCustomNodeHelper
|
||||
{
|
||||
internal static string GetPathName(object smoObject)
|
||||
{
|
||||
Table table = smoObject as Table;
|
||||
if (table != null)
|
||||
{
|
||||
return $"{table.Schema}.{table.Name}";
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user