Renaming namespaces to prevent issues with class names

This commit is contained in:
Benjamin Russell
2016-07-25 11:43:26 -07:00
parent bd83045a0a
commit 31576d0731
55 changed files with 130 additions and 120 deletions

View File

@@ -4,7 +4,7 @@
//
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Contracts
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Contracts
{
/// <summary>
/// Defines a class that describes the capabilities of a language

View File

@@ -3,9 +3,9 @@
// 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
{

View File

@@ -3,7 +3,7 @@
// 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
{

View File

@@ -3,9 +3,9 @@
// 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>
/// Defines a message that is sent from the client to request

View File

@@ -4,9 +4,9 @@
//
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>
/// Defines a base implementation for servers and their clients over a

View File

@@ -7,9 +7,9 @@ using System.Diagnostics;
using System.IO;
using System.Text;
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>
/// Provides a client implementation for the standard I/O channel.

View File

@@ -6,9 +6,9 @@
using System.IO;
using System.Text;
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>
/// Provides a server implementation for the standard I/O channel.

View File

@@ -6,7 +6,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
{
public static class Constants
{

View File

@@ -3,7 +3,7 @@
// 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>
/// Defines an event type with a particular method name.

View File

@@ -6,7 +6,7 @@
using System.Diagnostics;
using Newtonsoft.Json.Linq;
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts
{
/// <summary>
/// Defines all possible message types.

View File

@@ -5,7 +5,7 @@
using System.Diagnostics;
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts
{
[DebuggerDisplay("RequestType MethodName = {MethodName}")]
public class RequestType<TParams, TResult>

View File

@@ -4,9 +4,9 @@
//
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>
/// Provides context for a received event so that handlers

View File

@@ -4,9 +4,9 @@
//
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
{

View File

@@ -8,11 +8,11 @@ using System.Collections.Generic;
using System.IO;
using System.Threading;
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.ServiceLayer.ServiceHost.Protocol.Contracts;
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
{
public class MessageDispatcher
{

View File

@@ -5,7 +5,7 @@
using System;
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
{
public class MessageParseException : Exception
{

View File

@@ -3,7 +3,7 @@
// 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>
/// Defines the possible message protocol types.

View File

@@ -9,12 +9,12 @@ using System.IO;
using System.Text;
using System.Threading.Tasks;
using Microsoft.SqlTools.EditorServices.Utility;
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Serializers;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
{
public class MessageReader
{

View File

@@ -7,12 +7,12 @@ using System.IO;
using System.Text;
using System.Threading.Tasks;
using Microsoft.SqlTools.EditorServices.Utility;
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Serializers;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
{
public class MessageWriter
{

View File

@@ -7,10 +7,10 @@ using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Channel;
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
{
/// <summary>
/// Provides behavior for a client or server endpoint that

View File

@@ -4,10 +4,10 @@
//
using System.Threading.Tasks;
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
using Newtonsoft.Json.Linq;
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
{
public class RequestContext<TResult>
{

View File

@@ -3,10 +3,10 @@
// 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;
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Serializers
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers
{
/// <summary>
/// Defines a common interface for message serializers.

View File

@@ -3,10 +3,10 @@
// 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;
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Serializers
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers
{
/// <summary>
/// Serializes messages in the JSON RPC format. Used primarily

View File

@@ -5,9 +5,9 @@
using Newtonsoft.Json.Linq;
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>
/// Serializes messages in the V8 format. Used primarily for debug adapters.

View File

@@ -7,11 +7,11 @@ using System.Threading.Tasks;
using System.Collections.Generic;
using System.Linq;
using Microsoft.SqlTools.EditorServices.Utility;
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Contracts;
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol;
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Channel;
using Microsoft.SqlTools.ServiceLayer.Hosting.Contracts;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel;
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost
namespace Microsoft.SqlTools.ServiceLayer.Hosting
{
/// <summary>
/// SQL Tools VS Code Language Server request handler

View File

@@ -4,18 +4,18 @@
//
using System.Threading.Tasks;
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Contracts;
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol;
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Channel;
using Microsoft.SqlTools.ServiceLayer.Hosting.Contracts;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel;
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost
namespace Microsoft.SqlTools.ServiceLayer.Hosting
{
public abstract class ServiceHostBase : ProtocolEndpoint
{
private bool isStarted;
private TaskCompletionSource<bool> serverExitedTask;
public ServiceHostBase(ChannelBase serverChannel) :
protected ServiceHostBase(ChannelBase serverChannel) :
base(serverChannel, MessageProtocolType.LanguageServer)
{
}

View File

@@ -4,10 +4,10 @@
//
using System.Diagnostics;
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts;
namespace Microsoft.SqlTools.ServiceLayer.LanguageService.Contracts
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
{
public class CompletionRequest
{

View File

@@ -3,10 +3,10 @@
// 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.WorkspaceService.Contracts;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts;
namespace Microsoft.SqlTools.ServiceLayer.LanguageService.Contracts
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
{
public class DefinitionRequest
{

View File

@@ -3,10 +3,10 @@
// 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.WorkspaceService.Contracts;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts;
namespace Microsoft.SqlTools.ServiceLayer.LanguageService.Contracts
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
{
public class PublishDiagnosticsNotification
{

View File

@@ -3,10 +3,10 @@
// 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.WorkspaceService.Contracts;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts;
namespace Microsoft.SqlTools.ServiceLayer.LanguageService.Contracts
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
{
public enum DocumentHighlightKind
{

View File

@@ -3,9 +3,9 @@
// 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
{

View File

@@ -4,9 +4,9 @@
//
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
{

View File

@@ -3,10 +3,10 @@
// 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.WorkspaceService.Contracts;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts;
namespace Microsoft.SqlTools.ServiceLayer.LanguageService.Contracts
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
{
public class MarkedString
{

View File

@@ -3,9 +3,9 @@
// 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
{

View File

@@ -3,10 +3,10 @@
// 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.WorkspaceService.Contracts;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts;
namespace Microsoft.SqlTools.ServiceLayer.LanguageService.Contracts
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
{
public class ReferencesRequest
{

View File

@@ -3,9 +3,9 @@
// 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
{

View File

@@ -3,10 +3,10 @@
// 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.WorkspaceService.Contracts;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts;
namespace Microsoft.SqlTools.ServiceLayer.LanguageService.Contracts
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
{
public class SignatureHelpRequest
{

View File

@@ -7,14 +7,15 @@ using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.SqlTools.EditorServices.Utility;
using Microsoft.SqlTools.ServiceLayer.LanguageService.Contracts;
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol;
using Microsoft.SqlTools.ServiceLayer.Hosting;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
using Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts;
using Microsoft.SqlTools.ServiceLayer.SqlContext;
using Microsoft.SqlTools.ServiceLayer.WorkspaceService;
using Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts;
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices;
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts;
using System.Linq;
namespace Microsoft.SqlTools.ServiceLayer.LanguageService
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices
{
/// <summary>
/// Main class for Language Service functionality
@@ -71,7 +72,7 @@ namespace Microsoft.SqlTools.ServiceLayer.LanguageService
#endregion
public void InitializeService(ServiceHost.ServiceHost serviceHost, SqlToolsContext context)
public void InitializeService(ServiceHost serviceHost, SqlToolsContext context)
{
// Register the requests that this service will handle
serviceHost.SetRequestHandler(DefinitionRequest.Type, HandleDefinitionRequest);

View File

@@ -3,7 +3,10 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using Microsoft.SqlTools.EditorServices.Utility;
using Microsoft.SqlTools.ServiceLayer.Hosting;
using Microsoft.SqlTools.ServiceLayer.SqlContext;
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices;
using Microsoft.SqlTools.ServiceLayer.LanguageServices;
namespace Microsoft.SqlTools.ServiceLayer
{
@@ -32,11 +35,11 @@ namespace Microsoft.SqlTools.ServiceLayer
SqlToolsContext sqlToolsContext = new SqlToolsContext(hostDetails, profilePaths);
// Create the service host
ServiceHost.ServiceHost serviceHost = ServiceHost.ServiceHost.Create();
ServiceHost serviceHost = ServiceHost.Create();
// Initialize the services that will be hosted here
WorkspaceService.WorkspaceService<SqlToolsSettings>.Instance.InitializeService(serviceHost);
LanguageService.LanguageService.Instance.InitializeService(serviceHost, sqlToolsContext);
WorkspaceService<SqlToolsSettings>.Instance.InitializeService(serviceHost);
LanguageService.Instance.InitializeService(serviceHost, sqlToolsContext);
// Start the service
serviceHost.Start().Wait();

View File

@@ -5,7 +5,7 @@
using System.Diagnostics;
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts
{
/// <summary>
/// Provides details about a position in a file buffer. All

View File

@@ -6,7 +6,7 @@
using System;
using System.Diagnostics;
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts
{
/// <summary>
/// Provides details about a range between two positions in

View File

@@ -3,9 +3,9 @@
// 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>
{

View File

@@ -3,7 +3,7 @@
// 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>
/// Contains details relating to a content change in an open file.

View File

@@ -3,7 +3,7 @@
// 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>
/// Provides details and operations for a buffer position in a

View File

@@ -9,7 +9,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts
{
/// <summary>
/// Contains the details and contents of an open script file.

View File

@@ -3,7 +3,7 @@
// 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>
/// Defines the message level of a script file marker.

View File

@@ -5,7 +5,7 @@
//using System.Management.Automation.Language;
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts
{
/// <summary>
/// Contains details about a specific region of text in script file.

View File

@@ -4,9 +4,9 @@
//
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>
/// Defines a base parameter class for identifying a text document.

View File

@@ -3,9 +3,9 @@
// 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
{

View File

@@ -10,9 +10,9 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Linq;
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>
/// Manages a "workspace" of script files that are open for a particular

View File

@@ -8,11 +8,12 @@ using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Microsoft.SqlTools.EditorServices.Utility;
using Microsoft.SqlTools.ServiceLayer.ServiceHost.Protocol;
using Microsoft.SqlTools.ServiceLayer.WorkspaceService.Contracts;
using Microsoft.SqlTools.ServiceLayer.Hosting;
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
using Microsoft.SqlTools.ServiceLayer.WorkspaceServices.Contracts;
using System.Linq;
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceService
namespace Microsoft.SqlTools.ServiceLayer.WorkspaceServices
{
public class WorkspaceService<TConfig> where TConfig : new()
{
@@ -59,7 +60,7 @@ namespace Microsoft.SqlTools.ServiceLayer.WorkspaceService
#region Public Methods
public void InitializeService(ServiceHost.ServiceHost serviceHost)
public void InitializeService(ServiceHost serviceHost)
{
// Create a workspace that will handle state for the session
Workspace = new Workspace();

View File

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

View File

@@ -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
{

View File

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

View File

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