diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Contracts/VersionRequest.cs b/src/Microsoft.SqlTools.ServiceLayer/Hosting/Contracts/VersionRequest.cs index 96a1808c..ed7ab358 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Hosting/Contracts/VersionRequest.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/Hosting/Contracts/VersionRequest.cs @@ -7,10 +7,14 @@ using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts; namespace Microsoft.SqlTools.ServiceLayer.Hosting.Contracts { + /// + /// Defines a message that is sent from the client to request + /// the version of the server. + /// public class VersionRequest { public static readonly - RequestType Type = - RequestType.Create("version"); + RequestType Type = + RequestType.Create("version"); } } diff --git a/src/Microsoft.SqlTools.ServiceLayer/Hosting/ServiceHost.cs b/src/Microsoft.SqlTools.ServiceLayer/Hosting/ServiceHost.cs index 46fc1db5..1270982f 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/Hosting/ServiceHost.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/Hosting/ServiceHost.cs @@ -71,7 +71,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Hosting private readonly List initializeCallbacks; - private static Version _serviceServion = Assembly.GetEntryAssembly().GetName().Version; + private static readonly Version serviceVersion = Assembly.GetEntryAssembly().GetName().Version; #endregion @@ -153,12 +153,15 @@ namespace Microsoft.SqlTools.ServiceLayer.Hosting }); } + /// + /// Handles the version request. Sends back the server version as result. + /// private static async Task HandleVersionRequest( - string workspaceSymbolParams, + object versionRequestParams, RequestContext requestContext) { Logger.Write(LogLevel.Verbose, "HandleVersionRequest"); - await requestContext.SendResult(_serviceServion.ToString()); + await requestContext.SendResult(serviceVersion.ToString()); } #endregion