SQL Tools Service
Show / Hide Table of Contents
Improve this Doc View Source

Class ServiceHost

SQL Tools VS Code Language Server request handler. Provides the entire JSON RPC implementation for sending/receiving JSON requests and dispatching the requests to handlers that are registered prior to startup.

Inheritance
System.Object
ProtocolEndpoint
ServiceHostBase
ServiceHost
Namespace:Microsoft.SqlTools.ServiceLayer.Hosting
Assembly:Microsoft.SqlTools.ServiceLayer.dll
Syntax
public sealed class ServiceHost : ServiceHostBase, IProtocolEndpoint, IMessageSender

Properties

| Improve this Doc View Source

Instance

Current instance of the ServiceHost

Declaration
public static ServiceHost Instance { get; }
Type Description
ServiceHost

Methods

| Improve this Doc View Source

Initialize()

Provide initialization that must occur after the service host is started

Declaration
public void Initialize()
| Improve this Doc View Source

RegisterInitializeTask(ServiceHost.InitializeCallback)

Add a new method to be called when the initialize request is submitted

Declaration
public void RegisterInitializeTask(ServiceHost.InitializeCallback callback)
Parameters
Type Name Description
ServiceHost.InitializeCallback callback

Callback to perform when an initialize request is submitted

| Improve this Doc View Source

RegisterShutdownTask(ServiceHost.ShutdownCallback)

Adds a new callback to be called when the shutdown request is submitted

Declaration
public void RegisterShutdownTask(ServiceHost.ShutdownCallback callback)
Parameters
Type Name Description
ServiceHost.ShutdownCallback callback

Callback to perform when a shutdown request is submitted

  • Improve this Doc
  • View Source

© Microsoft  //  Generated with DocFX