Move unused forked code to external directory (#1192)

* Move unused forked code to external directory

* Fix SLN build errors

* Add back resource provider core since it's referenced by main resource provider project

* Update PackageProjects step of pipeline
This commit is contained in:
Karl Burtram
2021-04-16 15:33:35 -07:00
committed by GitHub
parent dc6555a823
commit ccf95aed77
229 changed files with 10058 additions and 10124 deletions

View File

@@ -0,0 +1,53 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.SqlTools.Hosting.Contracts;
using Microsoft.SqlTools.DataProtocol.Contracts.Connection;
namespace Microsoft.SqlTools.DataProtocol.Contracts.Explorer
{
/// <summary>
/// Information returned from a <see cref="CloseSessionRequest"/>.
/// Contains success information, a <see cref="SessionId"/> to be used when
/// requesting closing an existing session.
/// </summary>
public class CloseSessionResponse
{
/// <summary>
/// Boolean indicating if the session was closed successfully
/// </summary>
public bool Success { get; set; }
/// <summary>
/// Unique ID to use when sending any requests for objects in the
/// tree under the node
/// </summary>
public string SessionId { get; set; }
}
/// <summary>
/// Parameters to the <see cref="CloseSessionRequest"/>.
/// </summary>
public class CloseSessionParams
{
/// <summary>
/// The Id returned from a <see cref="CreateSessionRequest"/>. This
/// is used to disambiguate between different trees.
/// </summary>
public string SessionId { get; set; }
}
/// <summary>
/// Establishes an Object Explorer tree session for a specific connection.
/// This will create a connection to a specific server or database, register
/// it for use in the
/// </summary>
public class CloseSessionRequest
{
public static readonly
RequestType<CloseSessionParams, CloseSessionResponse> Type =
RequestType<CloseSessionParams, CloseSessionResponse>.Create("explorer/closesession");
}
}

View File

@@ -0,0 +1,65 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.SqlTools.Hosting.Contracts;
using Microsoft.SqlTools.DataProtocol.Contracts.Connection;
namespace Microsoft.SqlTools.DataProtocol.Contracts.Explorer
{
/// <summary>
/// Information returned from a <see cref="CreateSessionRequest"/>.
/// Contains success information, a <see cref="SessionId"/> to be used when
/// requesting expansion of nodes, and a root node to display for this area.
/// </summary>
public class CreateSessionResponse
{
/// <summary>
/// Unique ID to use when sending any requests for objects in the
/// tree under the node
/// </summary>
public string SessionId { get; set; }
}
/// <summary>
/// Information returned from a <see cref="CreateSessionRequest"/>.
/// Contains success information, a <see cref="SessionId"/> to be used when
/// requesting expansion of nodes, and a root node to display for this area.
/// </summary>
public class SessionCreatedParameters
{
/// <summary>
/// Boolean indicating if the connection was successful
/// </summary>
public bool Success { get; set; }
/// <summary>
/// Unique ID to use when sending any requests for objects in the
/// tree under the node
/// </summary>
public string SessionId { get; set; }
/// <summary>
/// Information describing the base node in the tree
/// </summary>
public NodeInfo RootNode { get; set; }
/// <summary>
/// Error message returned from the engine for a object explorer session failure reason, if any.
/// </summary>
public string ErrorMessage { get; set; }
}
/// <summary>
/// Session notification mapping entry
/// </summary>
public class CreateSessionCompleteNotification
{
public static readonly
EventType<SessionCreatedParameters> Type =
EventType<SessionCreatedParameters>.Create("explorer/sessioncreated");
}
}

View File

@@ -0,0 +1,76 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.SqlTools.Hosting.Contracts;
namespace Microsoft.SqlTools.DataProtocol.Contracts.Explorer
{
/// <summary>
/// Information returned from a <see cref="ExpandRequest"/>.
/// </summary>
public class ExpandResponse
{
/// <summary>
/// Unique ID to use when sending any requests for objects in the
/// tree under the node
/// </summary>
public string SessionId { get; set; }
/// <summary>
/// Information describing the expanded nodes in the tree
/// </summary>
public NodeInfo[] Nodes { get; set; }
/// <summary>
/// Path identifying the node to expand. See <see cref="NodeInfo.NodePath"/> for details
/// </summary>
public string NodePath { get; set; }
/// <summary>
/// Error message returned from the engine for a object explorer expand failure reason, if any.
/// </summary>
public string ErrorMessage { get; set; }
}
/// <summary>
/// Parameters to the <see cref="ExpandRequest"/>.
/// </summary>
public class ExpandParams
{
/// <summary>
/// The Id returned from a <see cref="CreateSessionRequest"/>. This
/// is used to disambiguate between different trees.
/// </summary>
public string SessionId { get; set; }
/// <summary>
/// Path identifying the node to expand. See <see cref="NodeInfo.NodePath"/> for details
/// </summary>
public string NodePath { get; set; }
}
/// <summary>
/// A request to expand a node in the tree
/// </summary>
public class ExpandRequest
{
/// <summary>
/// Returns children of a given node as a <see cref="NodeInfo"/> array.
/// </summary>
public static readonly
RequestType<ExpandParams, bool> Type =
RequestType<ExpandParams, bool>.Create("explorer/expand");
}
/// <summary>
/// Expand notification mapping entry
/// </summary>
public class ExpandCompleteNotification
{
public static readonly
EventType<ExpandResponse> Type =
EventType<ExpandResponse>.Create("explorer/expandCompleted");
}
}

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.Contracts;
using Microsoft.SqlTools.DataProtocol.Contracts.Connection;
namespace Microsoft.SqlTools.DataProtocol.Contracts.Explorer
{
/// <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("explorer/findnodes");
}
}

View File

@@ -0,0 +1,63 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.SqlTools.DataProtocol.Contracts.Metadata;
namespace Microsoft.SqlTools.DataProtocol.Contracts.Explorer
{
/// <summary>
/// Information describing a Node in the Object Explorer tree.
/// Contains information required to display the Node to the user and
/// to know whether actions such as expanding children is possible
/// the node
/// </summary>
public class NodeInfo
{
/// <summary>
/// Path identifying this node: for example a table will be at ["server", "database", "tables", "tableName"].
/// This enables rapid navigation of the tree without the need for a global registry of elements.
/// The path functions as a unique ID and is used to disambiguate the node when sending requests for expansion.
/// A common ID is needed since processes do not share address space and need a unique identifier
/// </summary>
public string NodePath { get; set; }
/// <summary>
/// The type of the node - for example Server, Database, Folder, Table
/// </summary>
public string NodeType { get; set; }
/// <summary>
/// Label to display to the user, describing this node.
/// </summary>
public string Label { get; set; }
/// <summary>
/// Node Sub type - for example a key can have type as "Key" and sub type as "PrimaryKey"
/// </summary>
public string NodeSubType { get; set; }
/// <summary>
/// Node status - for example login can be disabled/enabled
/// </summary>
public string NodeStatus { get; set; }
/// <summary>
/// Is this a leaf node (in which case no children can be generated) or
/// is it expandable?
/// </summary>
public bool IsLeaf { get; set; }
/// <summary>
/// Object Metadata for smo objects to be used for scripting
/// </summary>
public ObjectMetadata Metadata { get; set; }
/// <summary>
/// Error message returned from the engine for a object explorer node failure reason, if any.
/// </summary>
public string ErrorMessage { get; set; }
}
}

View File

@@ -0,0 +1,29 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.SqlTools.Hosting.Contracts;
namespace Microsoft.SqlTools.DataProtocol.Contracts.Explorer
{
/// <summary>
/// Parameters to the <see cref="ExpandRequest"/>.
/// </summary>
public class RefreshParams: ExpandParams
{
}
/// <summary>
/// A request to expand a
/// </summary>
public class RefreshRequest
{
/// <summary>
/// Returns children of a given node as a <see cref="NodeInfo"/> array.
/// </summary>
public static readonly
RequestType<RefreshParams, bool> Type =
RequestType<RefreshParams, bool>.Create("explorer/refresh");
}
}