Improve this Doc
View Source
Inheritance
System.Object
MessageDispatcher
Namespace:Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
Assembly:Microsoft.SqlTools.ServiceLayer.dll
public class MessageDispatcher
Constructors
|
Improve this Doc
View Source
Declaration
public MessageDispatcher(ChannelBase protocolChannel)
Parameters
Properties
|
Improve this Doc
View Source
Declaration
public bool InMessageLoopThread { get; }
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Declaration
protected MessageReader MessageReader { get; }
|
Improve this Doc
View Source
Declaration
protected MessageWriter MessageWriter { get; }
|
Improve this Doc
View Source
SynchronizationContext
Declaration
public SynchronizationContext SynchronizationContext { get; }
Type |
Description |
System.Threading.SynchronizationContext |
|
Methods
|
Improve this Doc
View Source
Declaration
protected Task DispatchMessage(Message messageToDispatch, MessageWriter messageWriter)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
|
Improve this Doc
View Source
Declaration
protected void OnUnhandledException(Exception unhandledException)
Parameters
Type |
Name |
Description |
System.Exception |
unhandledException |
|
|
Improve this Doc
View Source
SetEventHandler<TParams>(EventType<TParams>, Func<TParams, EventContext, Task>)
Declaration
public 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 |
|
|
Improve this Doc
View Source
SetEventHandler<TParams>(EventType<TParams>, Func<TParams, EventContext, Task>, Boolean)
Declaration
public 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 |
|
|
Improve this Doc
View Source
SetRequestHandler<TParams, TResult>(RequestType<TParams, TResult>, Func<TParams, RequestContext<TResult>, Task>)
Declaration
public 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 |
|
|
Improve this Doc
View Source
SetRequestHandler<TParams, TResult>(RequestType<TParams, TResult>, Func<TParams, RequestContext<TResult>, Task>, Boolean)
Declaration
public void SetRequestHandler<TParams, TResult>(RequestType<TParams, TResult> requestType, Func<TParams, RequestContext<TResult>, Task> requestHandler, bool overrideExisting)
Parameters
Type |
Name |
Description |
RequestType<TParams, TResult> |
requestType |
|
System.Func<TParams, RequestContext<TResult>, System.Threading.Tasks.Task> |
requestHandler |
|
System.Boolean |
overrideExisting |
|
|
Improve this Doc
View Source
Declaration
public void SetResponseHandler(Action<Message> responseHandler)
Parameters
Type |
Name |
Description |
System.Action<Message> |
responseHandler |
|
|
Improve this Doc
View Source
Declaration
|
Improve this Doc
View Source
Declaration
Events
|
Improve this Doc
View Source
Declaration
public event EventHandler<Exception> UnhandledException