mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Renaming namespaces to prevent issues with class names
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Contracts
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines a class that describes the capabilities of a language
|
/// Defines a class that describes the capabilities of a language
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Contracts
|
||||||
{
|
{
|
||||||
public class InitializeRequest
|
public class InitializeRequest
|
||||||
{
|
{
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Contracts
|
||||||
{
|
{
|
||||||
public class ServerCapabilities
|
public class ServerCapabilities
|
||||||
{
|
{
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Contracts
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines a message that is sent from the client to request
|
/// Defines a message that is sent from the client to request
|
||||||
@@ -4,9 +4,9 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Serializers;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Channel
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines a base implementation for servers and their clients over a
|
/// Defines a base implementation for servers and their clients over a
|
||||||
@@ -7,9 +7,9 @@ using System.Diagnostics;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Serializers;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Channel
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides a client implementation for the standard I/O channel.
|
/// Provides a client implementation for the standard I/O channel.
|
||||||
@@ -6,9 +6,9 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Serializers;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Channel
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides a server implementation for the standard I/O channel.
|
/// Provides a server implementation for the standard I/O channel.
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Serialization;
|
using Newtonsoft.Json.Serialization;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
||||||
{
|
{
|
||||||
public static class Constants
|
public static class Constants
|
||||||
{
|
{
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines an event type with a particular method name.
|
/// Defines an event type with a particular method name.
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines all possible message types.
|
/// Defines all possible message types.
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts
|
||||||
{
|
{
|
||||||
[DebuggerDisplay("RequestType MethodName = {MethodName}")]
|
[DebuggerDisplay("RequestType MethodName = {MethodName}")]
|
||||||
public class RequestType<TParams, TResult>
|
public class RequestType<TParams, TResult>
|
||||||
@@ -4,9 +4,9 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides context for a received event so that handlers
|
/// Provides context for a received event so that handlers
|
||||||
@@ -4,9 +4,9 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
||||||
{
|
{
|
||||||
internal interface IMessageSender
|
internal interface IMessageSender
|
||||||
{
|
{
|
||||||
@@ -8,11 +8,11 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Channel;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel;
|
||||||
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
using Microsoft.SqlTools.EditorServices.Utility;
|
using Microsoft.SqlTools.EditorServices.Utility;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
||||||
{
|
{
|
||||||
public class MessageDispatcher
|
public class MessageDispatcher
|
||||||
{
|
{
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
||||||
{
|
{
|
||||||
public class MessageParseException : Exception
|
public class MessageParseException : Exception
|
||||||
{
|
{
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines the possible message protocol types.
|
/// Defines the possible message protocol types.
|
||||||
@@ -9,12 +9,12 @@ using System.IO;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.EditorServices.Utility;
|
using Microsoft.SqlTools.EditorServices.Utility;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Serializers;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
||||||
{
|
{
|
||||||
public class MessageReader
|
public class MessageReader
|
||||||
{
|
{
|
||||||
@@ -7,12 +7,12 @@ using System.IO;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.EditorServices.Utility;
|
using Microsoft.SqlTools.EditorServices.Utility;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Serializers;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
||||||
{
|
{
|
||||||
public class MessageWriter
|
public class MessageWriter
|
||||||
{
|
{
|
||||||
@@ -7,10 +7,10 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Channel;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides behavior for a client or server endpoint that
|
/// Provides behavior for a client or server endpoint that
|
||||||
@@ -4,10 +4,10 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
||||||
{
|
{
|
||||||
public class RequestContext<TResult>
|
public class RequestContext<TResult>
|
||||||
{
|
{
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Serializers
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines a common interface for message serializers.
|
/// Defines a common interface for message serializers.
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Serializers
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Serializes messages in the JSON RPC format. Used primarily
|
/// Serializes messages in the JSON RPC format. Used primarily
|
||||||
@@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using System;
|
using System;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Serializers
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Serializes messages in the V8 format. Used primarily for debug adapters.
|
/// Serializes messages in the V8 format. Used primarily for debug adapters.
|
||||||
@@ -7,11 +7,11 @@ using System.Threading.Tasks;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.SqlTools.EditorServices.Utility;
|
using Microsoft.SqlTools.EditorServices.Utility;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Channel;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// SQL Tools VS Code Language Server request handler
|
/// SQL Tools VS Code Language Server request handler
|
||||||
@@ -4,18 +4,18 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Channel;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost
|
namespace Microsoft.SqlTools.ServiceLayer.Hosting
|
||||||
{
|
{
|
||||||
public abstract class ServiceHostBase : ProtocolEndpoint
|
public abstract class ServiceHostBase : ProtocolEndpoint
|
||||||
{
|
{
|
||||||
private bool isStarted;
|
private bool isStarted;
|
||||||
private TaskCompletionSource<bool> serverExitedTask;
|
private TaskCompletionSource<bool> serverExitedTask;
|
||||||
|
|
||||||
public ServiceHostBase(ChannelBase serverChannel) :
|
protected ServiceHostBase(ChannelBase serverChannel) :
|
||||||
base(serverChannel, MessageProtocolType.LanguageServer)
|
base(serverChannel, MessageProtocolType.LanguageServer)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -4,10 +4,10 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.LanguageService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
|
||||||
{
|
{
|
||||||
public class CompletionRequest
|
public class CompletionRequest
|
||||||
{
|
{
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.LanguageService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
|
||||||
{
|
{
|
||||||
public class DefinitionRequest
|
public class DefinitionRequest
|
||||||
{
|
{
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.LanguageService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
|
||||||
{
|
{
|
||||||
public class PublishDiagnosticsNotification
|
public class PublishDiagnosticsNotification
|
||||||
{
|
{
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.LanguageService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
|
||||||
{
|
{
|
||||||
public enum DocumentHighlightKind
|
public enum DocumentHighlightKind
|
||||||
{
|
{
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.LanguageService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
|
||||||
{
|
{
|
||||||
public class ExpandAliasRequest
|
public class ExpandAliasRequest
|
||||||
{
|
{
|
||||||
@@ -4,9 +4,9 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.LanguageService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
|
||||||
{
|
{
|
||||||
public class FindModuleRequest
|
public class FindModuleRequest
|
||||||
{
|
{
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.LanguageService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
|
||||||
{
|
{
|
||||||
public class MarkedString
|
public class MarkedString
|
||||||
{
|
{
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.LanguageService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
|
||||||
{
|
{
|
||||||
class InstallModuleRequest
|
class InstallModuleRequest
|
||||||
{
|
{
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.LanguageService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
|
||||||
{
|
{
|
||||||
public class ReferencesRequest
|
public class ReferencesRequest
|
||||||
{
|
{
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.LanguageService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
|
||||||
{
|
{
|
||||||
public class ShowOnlineHelpRequest
|
public class ShowOnlineHelpRequest
|
||||||
{
|
{
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.LanguageService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
|
||||||
{
|
{
|
||||||
public class SignatureHelpRequest
|
public class SignatureHelpRequest
|
||||||
{
|
{
|
||||||
@@ -7,14 +7,15 @@ using System;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.EditorServices.Utility;
|
using Microsoft.SqlTools.EditorServices.Utility;
|
||||||
using Microsoft.SqlTools.ServiceLayer.LanguageService.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
|
||||||
|
using Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.SqlContext;
|
using Microsoft.SqlTools.ServiceLayer.SqlContext;
|
||||||
using Microsoft.SqlTools.ServiceLayer.WorkspaceService;
|
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices;
|
||||||
using Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.LanguageService
|
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Main class for Language Service functionality
|
/// Main class for Language Service functionality
|
||||||
@@ -71,7 +72,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageService
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public void InitializeService(ServiceHost.ServiceHost serviceHost, SqlToolsContext context)
|
public void InitializeService(ServiceHost serviceHost, SqlToolsContext context)
|
||||||
{
|
{
|
||||||
// Register the requests that this service will handle
|
// Register the requests that this service will handle
|
||||||
serviceHost.SetRequestHandler(DefinitionRequest.Type, HandleDefinitionRequest);
|
serviceHost.SetRequestHandler(DefinitionRequest.Type, HandleDefinitionRequest);
|
||||||
@@ -3,7 +3,10 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
using System;
|
using System;
|
||||||
using Microsoft.SqlTools.EditorServices.Utility;
|
using Microsoft.SqlTools.EditorServices.Utility;
|
||||||
|
using Microsoft.SqlTools.ServiceLayer.Hosting;
|
||||||
using Microsoft.SqlTools.ServiceLayer.SqlContext;
|
using Microsoft.SqlTools.ServiceLayer.SqlContext;
|
||||||
|
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices;
|
||||||
|
using Microsoft.SqlTools.ServiceLayer.LanguageServices;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer
|
namespace Microsoft.SqlTools.ServiceLayer
|
||||||
{
|
{
|
||||||
@@ -32,11 +35,11 @@ namespace Microsoft.SqlTools.ServiceLayer
|
|||||||
SqlToolsContext sqlToolsContext = new SqlToolsContext(hostDetails, profilePaths);
|
SqlToolsContext sqlToolsContext = new SqlToolsContext(hostDetails, profilePaths);
|
||||||
|
|
||||||
// Create the service host
|
// Create the service host
|
||||||
ServiceHost.ServiceHost serviceHost = ServiceHost.ServiceHost.Create();
|
ServiceHost serviceHost = ServiceHost.Create();
|
||||||
|
|
||||||
// Initialize the services that will be hosted here
|
// Initialize the services that will be hosted here
|
||||||
WorkspaceService.WorkspaceService<SqlToolsSettings>.Instance.InitializeService(serviceHost);
|
WorkspaceService<SqlToolsSettings>.Instance.InitializeService(serviceHost);
|
||||||
LanguageService.LanguageService.Instance.InitializeService(serviceHost, sqlToolsContext);
|
LanguageService.Instance.InitializeService(serviceHost, sqlToolsContext);
|
||||||
|
|
||||||
// Start the service
|
// Start the service
|
||||||
serviceHost.Start().Wait();
|
serviceHost.Start().Wait();
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides details about a position in a file buffer. All
|
/// Provides details about a position in a file buffer. All
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides details about a range between two positions in
|
/// Provides details about a range between two positions in
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts
|
||||||
{
|
{
|
||||||
public class DidChangeConfigurationNotification<TConfig>
|
public class DidChangeConfigurationNotification<TConfig>
|
||||||
{
|
{
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains details relating to a content change in an open file.
|
/// Contains details relating to a content change in an open file.
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides details and operations for a buffer position in a
|
/// Provides details and operations for a buffer position in a
|
||||||
@@ -9,7 +9,7 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains the details and contents of an open script file.
|
/// Contains the details and contents of an open script file.
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines the message level of a script file marker.
|
/// Defines the message level of a script file marker.
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
//using System.Management.Automation.Language;
|
//using System.Management.Automation.Language;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains details about a specific region of text in script file.
|
/// Contains details about a specific region of text in script file.
|
||||||
@@ -4,9 +4,9 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines a base parameter class for identifying a text document.
|
/// Defines a base parameter class for identifying a text document.
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts
|
||||||
{
|
{
|
||||||
public enum SymbolKind
|
public enum SymbolKind
|
||||||
{
|
{
|
||||||
@@ -10,9 +10,9 @@ using System.Text;
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.SqlTools.EditorServices.Utility;
|
using Microsoft.SqlTools.EditorServices.Utility;
|
||||||
using Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceService
|
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceServices
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Manages a "workspace" of script files that are open for a particular
|
/// Manages a "workspace" of script files that are open for a particular
|
||||||
@@ -8,11 +8,12 @@ using System.Collections.Generic;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.EditorServices.Utility;
|
using Microsoft.SqlTools.EditorServices.Utility;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol;
|
using Microsoft.SqlTools.ServiceLayer.Hosting;
|
||||||
using Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
|
||||||
|
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceService
|
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceServices
|
||||||
{
|
{
|
||||||
public class WorkspaceService<TConfig> where TConfig : new()
|
public class WorkspaceService<TConfig> where TConfig : new()
|
||||||
{
|
{
|
||||||
@@ -59,7 +60,7 @@ namespace Microsoft.SqlTools.ServiceLayer.WorkspaceService
|
|||||||
|
|
||||||
#region Public Methods
|
#region Public Methods
|
||||||
|
|
||||||
public void InitializeService(ServiceHost.ServiceHost serviceHost)
|
public void InitializeService(ServiceHost serviceHost)
|
||||||
{
|
{
|
||||||
// Create a workspace that will handle state for the session
|
// Create a workspace that will handle state for the session
|
||||||
Workspace = new Workspace();
|
Workspace = new Workspace();
|
||||||
@@ -7,8 +7,9 @@ using System;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Serializers;
|
using HostingMessage = Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.Message;
|
||||||
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Test.Message
|
namespace Microsoft.SqlTools.ServiceLayer.Test.Message
|
||||||
@@ -38,7 +39,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Message
|
|||||||
|
|
||||||
// Write the message and then roll back the stream to be read
|
// Write the message and then roll back the stream to be read
|
||||||
// TODO: This will need to be redone!
|
// TODO: This will need to be redone!
|
||||||
await messageWriter.WriteMessage(ServiceLayer.ServiceHost.Protocol.Contracts.Message.Event("testEvent", null));
|
await messageWriter.WriteMessage(HostingMessage.Event("testEvent", null));
|
||||||
outputStream.Seek(0, SeekOrigin.Begin);
|
outputStream.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
||||||
string expectedHeaderString =
|
string expectedHeaderString =
|
||||||
@@ -82,7 +83,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Message
|
|||||||
inputStream.Flush();
|
inputStream.Flush();
|
||||||
inputStream.Seek(0, SeekOrigin.Begin);
|
inputStream.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
||||||
ServiceLayer.ServiceHost.Protocol.Contracts.Message messageResult = messageReader.ReadMessage().Result;
|
HostingMessage messageResult = messageReader.ReadMessage().Result;
|
||||||
Assert.Equal("testEvent", messageResult.Method);
|
Assert.Equal("testEvent", messageResult.Method);
|
||||||
|
|
||||||
inputStream.Dispose();
|
inputStream.Dispose();
|
||||||
@@ -117,7 +118,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Message
|
|||||||
// Read the written messages from the stream
|
// Read the written messages from the stream
|
||||||
for (int i = 0; i < overflowMessageCount; i++)
|
for (int i = 0; i < overflowMessageCount; i++)
|
||||||
{
|
{
|
||||||
ServiceLayer.ServiceHost.Protocol.Contracts.Message messageResult = messageReader.ReadMessage().Result;
|
HostingMessage messageResult = messageReader.ReadMessage().Result;
|
||||||
Assert.Equal("testEvent", messageResult.Method);
|
Assert.Equal("testEvent", messageResult.Method);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,7 +146,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Message
|
|||||||
inputStream.Flush();
|
inputStream.Flush();
|
||||||
inputStream.Seek(0, SeekOrigin.Begin);
|
inputStream.Seek(0, SeekOrigin.Begin);
|
||||||
|
|
||||||
ServiceLayer.ServiceHost.Protocol.Contracts.Message messageResult = messageReader.ReadMessage().Result;
|
HostingMessage messageResult = messageReader.ReadMessage().Result;
|
||||||
Assert.Equal("testEvent", messageResult.Method);
|
Assert.Equal("testEvent", messageResult.Method);
|
||||||
|
|
||||||
inputStream.Dispose();
|
inputStream.Dispose();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Test.Message
|
namespace Microsoft.SqlTools.ServiceLayer.Test.Message
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,5 +15,8 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
|
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -3,7 +3,8 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Serializers;
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers;
|
||||||
|
using HostingMessage = Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.Message;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
@@ -43,7 +44,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.ServiceHost
|
|||||||
{
|
{
|
||||||
var messageObj =
|
var messageObj =
|
||||||
this.messageSerializer.SerializeMessage(
|
this.messageSerializer.SerializeMessage(
|
||||||
ServiceLayer.ServiceHost.Protocol.Contracts.Message.Request(
|
HostingMessage.Request(
|
||||||
MessageId,
|
MessageId,
|
||||||
MethodName,
|
MethodName,
|
||||||
MessageContent));
|
MessageContent));
|
||||||
@@ -60,7 +61,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.ServiceHost
|
|||||||
{
|
{
|
||||||
var messageObj =
|
var messageObj =
|
||||||
this.messageSerializer.SerializeMessage(
|
this.messageSerializer.SerializeMessage(
|
||||||
ServiceLayer.ServiceHost.Protocol.Contracts.Message.Event(
|
HostingMessage.Event(
|
||||||
MethodName,
|
MethodName,
|
||||||
MessageContent));
|
MessageContent));
|
||||||
|
|
||||||
@@ -75,7 +76,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.ServiceHost
|
|||||||
{
|
{
|
||||||
var messageObj =
|
var messageObj =
|
||||||
this.messageSerializer.SerializeMessage(
|
this.messageSerializer.SerializeMessage(
|
||||||
ServiceLayer.ServiceHost.Protocol.Contracts.Message.Response(
|
HostingMessage.Response(
|
||||||
MessageId,
|
MessageId,
|
||||||
null,
|
null,
|
||||||
MessageContent));
|
MessageContent));
|
||||||
@@ -91,7 +92,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.ServiceHost
|
|||||||
{
|
{
|
||||||
var messageObj =
|
var messageObj =
|
||||||
this.messageSerializer.SerializeMessage(
|
this.messageSerializer.SerializeMessage(
|
||||||
ServiceLayer.ServiceHost.Protocol.Contracts.Message.ResponseError(
|
HostingMessage.ResponseError(
|
||||||
MessageId,
|
MessageId,
|
||||||
null,
|
null,
|
||||||
MessageContent));
|
MessageContent));
|
||||||
|
|||||||
Reference in New Issue
Block a user