mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 18:47:57 -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
|
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 class VersionRequest
|
||||||
{
|
{
|
||||||
public static readonly
|
public static readonly
|
||||||
RequestType<string, string> Type =
|
RequestType<object, string> Type =
|
||||||
RequestType<string, string>.Create("version");
|
RequestType<object, string>.Create("version");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Hosting
|
|||||||
|
|
||||||
private readonly List<InitializeCallback> initializeCallbacks;
|
private readonly List<InitializeCallback> initializeCallbacks;
|
||||||
|
|
||||||
private static Version _serviceServion = Assembly.GetEntryAssembly().GetName().Version;
|
private static readonly Version serviceVersion = Assembly.GetEntryAssembly().GetName().Version;
|
||||||
|
|
||||||
#endregion
|
#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(
|
private static async Task HandleVersionRequest(
|
||||||
string workspaceSymbolParams,
|
object versionRequestParams,
|
||||||
RequestContext<string> requestContext)
|
RequestContext<string> requestContext)
|
||||||
{
|
{
|
||||||
Logger.Write(LogLevel.Verbose, "HandleVersionRequest");
|
Logger.Write(LogLevel.Verbose, "HandleVersionRequest");
|
||||||
await requestContext.SendResult(_serviceServion.ToString());
|
await requestContext.SendResult(serviceVersion.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user