mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
Fixing some issues, added documents
This commit is contained in:
@@ -7,10 +7,14 @@ using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines a message that is sent from the client to request
|
||||
/// the version of the server.
|
||||
/// </summary>
|
||||
public class VersionRequest
|
||||
{
|
||||
public static readonly
|
||||
RequestType<string, string> Type =
|
||||
RequestType<string, string>.Create("version");
|
||||
RequestType<object, string> Type =
|
||||
RequestType<object, string>.Create("version");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Hosting
|
||||
|
||||
private readonly List<InitializeCallback> 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
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles the version request. Sends back the server version as result.
|
||||
/// </summary>
|
||||
private static async Task HandleVersionRequest(
|
||||
string workspaceSymbolParams,
|
||||
object versionRequestParams,
|
||||
RequestContext<string> requestContext)
|
||||
{
|
||||
Logger.Write(LogLevel.Verbose, "HandleVersionRequest");
|
||||
await requestContext.SendResult(_serviceServion.ToString());
|
||||
await requestContext.SendResult(serviceVersion.ToString());
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user