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

Class ChannelBase

Defines a base implementation for servers and their clients over a single kind of communication channel.

Inheritance
System.Object
ChannelBase
Namespace:Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel
Assembly:Microsoft.SqlTools.ServiceLayer.dll
Syntax
public abstract class ChannelBase

Properties

| Improve this Doc View Source

IsConnected

Gets a boolean that is true if the channel is connected or false if not.

Declaration
public bool IsConnected { get; protected set; }
Type Description
System.Boolean
| Improve this Doc View Source

MessageReader

Gets the MessageReader for reading messages from the channel.

Declaration
public MessageReader MessageReader { get; protected set; }
Type Description
MessageReader
| Improve this Doc View Source

MessageWriter

Gets the MessageWriter for writing messages to the channel.

Declaration
public MessageWriter MessageWriter { get; protected set; }
Type Description
MessageWriter

Methods

| Improve this Doc View Source

Initialize(IMessageSerializer)

A method to be implemented by subclasses to handle the actual initialization of the channel and the creation and assignment of the MessageReader and MessageWriter properties.

Declaration
protected abstract void Initialize(IMessageSerializer messageSerializer)
Parameters
Type Name Description
IMessageSerializer messageSerializer

The IMessageSerializer to use for message serialization.

| Improve this Doc View Source

Shutdown()

A method to be implemented by subclasses to handle shutdown of the channel once Stop is called.

Declaration
protected abstract void Shutdown()
| Improve this Doc View Source

Start(MessageProtocolType)

Starts the channel and initializes the MessageDispatcher.

Declaration
public void Start(MessageProtocolType messageProtocolType)
Parameters
Type Name Description
MessageProtocolType messageProtocolType

The type of message protocol used by the channel.

| Improve this Doc View Source

Stop()

Stops the channel.

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

WaitForConnection()

Returns a Task that allows the consumer of the ChannelBase implementation to wait until a connection has been made to the opposite endpoint whether it's a client or server.

Declaration
public abstract Task WaitForConnection()
Returns
Type Description
System.Threading.Tasks.Task

A Task to be awaited until a connection is made.

  • Improve this Doc
  • View Source

© Microsoft  //  Generated with DocFX