mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-17 01:25:40 -05:00
added handler for oe refresh and close session requests (#332)
* added handler for oe refresh and close session requests
This commit is contained in:
@@ -74,7 +74,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes
|
||||
{
|
||||
proeprtyValue = (int)Convert.ChangeType(value, Type);
|
||||
}
|
||||
string orPrefix = i == 0 ? "" : "or";
|
||||
string orPrefix = i == 0 ? string.Empty : "or";
|
||||
filter = $"{filter} {orPrefix} @{Property} = {proeprtyValue}";
|
||||
}
|
||||
}
|
||||
@@ -91,8 +91,8 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes
|
||||
{
|
||||
var value = list[i];
|
||||
|
||||
string orPrefix = i == 0 ? "" : "and";
|
||||
filter = $"{filter} {orPrefix} {value.ToPropertyFilterString()}";
|
||||
string andPrefix = i == 0 ? string.Empty : "and";
|
||||
filter = $"{filter} {andPrefix} {value.ToPropertyFilterString()}";
|
||||
}
|
||||
filter = $"[{filter}]";
|
||||
|
||||
|
||||
@@ -195,6 +195,17 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes
|
||||
return children;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Refresh this node and returns its children
|
||||
/// </summary>
|
||||
/// <returns>Children as an IList. This is the raw children collection, not a copy</returns>
|
||||
public IList<TreeNode> Refresh()
|
||||
{
|
||||
// TODO consider why solution explorer has separate Children and Items options
|
||||
PopulateChildren();
|
||||
return children;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a readonly view of the currently defined children for this node.
|
||||
/// This does not expand the node at all
|
||||
@@ -242,7 +253,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes
|
||||
{
|
||||
return Parent as T;
|
||||
}
|
||||
|
||||
|
||||
protected void PopulateChildren()
|
||||
{
|
||||
Debug.Assert(IsAlwaysLeaf == false);
|
||||
|
||||
Reference in New Issue
Block a user