added handler for oe refresh and close session requests (#332)

* added handler for oe refresh and close session requests
This commit is contained in:
Leila Lali
2017-05-01 15:20:02 -07:00
committed by GitHub
parent c46032c71f
commit 0b39408eae
16 changed files with 2529 additions and 2186 deletions

View File

@@ -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}]";

View File

@@ -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);