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:
@@ -7,8 +7,9 @@ using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol;
|
||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Serializers;
|
||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
|
||||
using HostingMessage = Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts.Message;
|
||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers;
|
||||
using Xunit;
|
||||
|
||||
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
|
||||
// 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);
|
||||
|
||||
string expectedHeaderString =
|
||||
@@ -82,7 +83,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Message
|
||||
inputStream.Flush();
|
||||
inputStream.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
ServiceLayer.ServiceHost.Protocol.Contracts.Message messageResult = messageReader.ReadMessage().Result;
|
||||
HostingMessage messageResult = messageReader.ReadMessage().Result;
|
||||
Assert.Equal("testEvent", messageResult.Method);
|
||||
|
||||
inputStream.Dispose();
|
||||
@@ -117,7 +118,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Message
|
||||
// Read the written messages from the stream
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -145,7 +146,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.Message
|
||||
inputStream.Flush();
|
||||
inputStream.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
ServiceLayer.ServiceHost.Protocol.Contracts.Message messageResult = messageReader.ReadMessage().Result;
|
||||
HostingMessage messageResult = messageReader.ReadMessage().Result;
|
||||
Assert.Equal("testEvent", messageResult.Method);
|
||||
|
||||
inputStream.Dispose();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol;
|
||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.Test.Message
|
||||
{
|
||||
|
||||
@@ -15,5 +15,8 @@
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
||||
@@ -3,7 +3,8 @@
|
||||
// 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 Xunit;
|
||||
|
||||
@@ -43,7 +44,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.ServiceHost
|
||||
{
|
||||
var messageObj =
|
||||
this.messageSerializer.SerializeMessage(
|
||||
ServiceLayer.ServiceHost.Protocol.Contracts.Message.Request(
|
||||
HostingMessage.Request(
|
||||
MessageId,
|
||||
MethodName,
|
||||
MessageContent));
|
||||
@@ -60,7 +61,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.ServiceHost
|
||||
{
|
||||
var messageObj =
|
||||
this.messageSerializer.SerializeMessage(
|
||||
ServiceLayer.ServiceHost.Protocol.Contracts.Message.Event(
|
||||
HostingMessage.Event(
|
||||
MethodName,
|
||||
MessageContent));
|
||||
|
||||
@@ -75,7 +76,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.ServiceHost
|
||||
{
|
||||
var messageObj =
|
||||
this.messageSerializer.SerializeMessage(
|
||||
ServiceLayer.ServiceHost.Protocol.Contracts.Message.Response(
|
||||
HostingMessage.Response(
|
||||
MessageId,
|
||||
null,
|
||||
MessageContent));
|
||||
@@ -91,7 +92,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Test.ServiceHost
|
||||
{
|
||||
var messageObj =
|
||||
this.messageSerializer.SerializeMessage(
|
||||
ServiceLayer.ServiceHost.Protocol.Contracts.Message.ResponseError(
|
||||
HostingMessage.ResponseError(
|
||||
MessageId,
|
||||
null,
|
||||
MessageContent));
|
||||
|
||||
Reference in New Issue
Block a user