Support Object Explorer FindNodes request (#589)

This commit is contained in:
Matt Irvine
2018-03-15 10:47:52 -07:00
committed by GitHub
parent d36efb578c
commit 365fe2282e
8 changed files with 584 additions and 33 deletions

View File

@@ -0,0 +1,55 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System.Collections.Generic;
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.Connection.Contracts;
namespace Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Contracts
{
/// <summary>
/// Information returned from a <see cref="FindNodesRequest"/>.
/// </summary>
public class FindNodesResponse
{
/// <summary>
/// Information describing the matching nodes in the tree
/// </summary>
public List<NodeInfo> Nodes { get; set; }
}
/// <summary>
/// Parameters to the <see cref="FindNodesRequest"/>.
/// </summary>
public class FindNodesParams
{
/// <summary>
/// The Id returned from a <see cref="CreateSessionRequest"/>. This
/// is used to disambiguate between different trees.
/// </summary>
public string SessionId { get; set; }
public string Type { get; set; }
public string Schema { get; set; }
public string Name { get; set; }
public string Database { get; set; }
public List<string> ParentObjectNames { get; set; }
}
/// <summary>
/// TODO
/// </summary>
public class FindNodesRequest
{
public static readonly
RequestType<FindNodesParams, FindNodesResponse> Type =
RequestType<FindNodesParams, FindNodesResponse>.Create("objectexplorer/findnodes");
}
}