Show / Hide Table of Contents

# Interface IProtocolEndpoint

A ProtocolEndpoint is used for inter-process communication. Services can register to respond to requests and events, send their own requests, and listen for notifications sent by the other side of the endpoint

##### Inherited Members

IMessageSender.SendEvent<TParams>(EventType<TParams>, TParams)
IMessageSender.SendRequest<TParams, TResult>(RequestType<TParams, TResult>, TParams, Boolean)

###### Namespace:Microsoft.SqlTools.ServiceLayer.Hosting.Protocol

###### Assembly:Microsoft.SqlTools.ServiceLayer.dll

##### Syntax

    public interface IProtocolEndpoint : IMessageSender

### Methods

| Improve this Doc View Source

#### SetEventHandler<TParams>(EventType<TParams>, Func<TParams, EventContext, Task>)

##### Declaration

    void SetEventHandler<TParams>(EventType<TParams> eventType, Func<TParams, EventContext, Task> eventHandler)

##### Parameters

Type | Name | Description
--- | --- | ---
EventType<TParams> | eventType |
System.Func<TParams, EventContext, System.Threading.Tasks.Task> | eventHandler |

##### Type Parameters

Name | Description
--- | ---
TParams |

| Improve this Doc View Source

#### SetEventHandler<TParams>(EventType<TParams>, Func<TParams, EventContext, Task>, Boolean)

##### Declaration

    void SetEventHandler<TParams>(EventType<TParams> eventType, Func<TParams, EventContext, Task> eventHandler, bool overrideExisting)

##### Parameters

Type | Name | Description
--- | --- | ---
EventType<TParams> | eventType |
System.Func<TParams, EventContext, System.Threading.Tasks.Task> | eventHandler |
System.Boolean | overrideExisting |

##### Type Parameters

Name | Description
--- | ---
TParams |

| Improve this Doc View Source

#### SetRequestHandler<TParams, TResult>(RequestType<TParams, TResult>, Func<TParams, RequestContext<TResult>, Task>)

##### Declaration

    void SetRequestHandler<TParams, TResult>(RequestType<TParams, TResult> requestType, Func<TParams, RequestContext<TResult>, Task> requestHandler)

##### Parameters

Type | Name | Description
--- | --- | ---
RequestType<TParams, TResult> | requestType |
System.Func<TParams, RequestContext<TResult>, System.Threading.Tasks.Task> | requestHandler |

##### Type Parameters

Name | Description
--- | ---
TParams |
TResult |