-
Notifications
You must be signed in to change notification settings - Fork 105
/
Copy pathDebugAdapterServerOptions.cs
132 lines (101 loc) · 7.9 KB
/
DebugAdapterServerOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
using System;
using System.Threading;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using OmniSharp.Extensions.DebugAdapter.Protocol;
using OmniSharp.Extensions.DebugAdapter.Protocol.Models;
using OmniSharp.Extensions.DebugAdapter.Protocol.Server;
using OmniSharp.Extensions.DebugAdapter.Shared;
using OmniSharp.Extensions.JsonRpc;
namespace OmniSharp.Extensions.DebugAdapter.Server
{
public class DebugAdapterServerOptions : DebugAdapterRpcOptionsBase<DebugAdapterServerOptions>, IDebugAdapterServerRegistry
{
public DebugAdapterServerOptions()
{
WithAssemblies(typeof(DebugAdapterServerOptions).Assembly, typeof(DebugAdapterRequestRouter).Assembly);
}
public Capabilities Capabilities { get; set; } = new Capabilities();
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.AddHandler(string method, IJsonRpcHandler handler, JsonRpcHandlerOptions options) =>
AddHandler(method, handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.
AddHandler(string method, JsonRpcHandlerFactory handlerFunc, JsonRpcHandlerOptions options) => AddHandler(method, handlerFunc, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.AddHandlers(params IJsonRpcHandler[] handlers) => AddHandlers(handlers);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.AddHandler(JsonRpcHandlerFactory handlerFunc, JsonRpcHandlerOptions options) =>
AddHandler(handlerFunc, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.AddHandler(IJsonRpcHandler handler, JsonRpcHandlerOptions options) =>
AddHandler(handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.AddHandler<TTHandler>(JsonRpcHandlerOptions options) => AddHandler<TTHandler>(options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.AddHandler<TTHandler>(string method, JsonRpcHandlerOptions options) =>
AddHandler<TTHandler>(method, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.AddHandler(Type type, JsonRpcHandlerOptions options) => AddHandler(type, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.AddHandler(string method, Type type, JsonRpcHandlerOptions options) =>
AddHandler(method, type, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.AddHandlerLink(string sourceMethod, string destinationMethod) =>
AddHandlerLink(sourceMethod, destinationMethod);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.OnJsonRequest(
string method, Func<JToken, Task<JToken>> handler, JsonRpcHandlerOptions options
) => OnJsonRequest(method, handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.OnJsonRequest(
string method, Func<JToken, CancellationToken, Task<JToken>> handler, JsonRpcHandlerOptions options
) => OnJsonRequest(method, handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.OnRequest<TParams, TResponse>(
string method, Func<TParams, Task<TResponse>> handler, JsonRpcHandlerOptions options
) => OnRequest(method, handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.OnRequest<TParams, TResponse>(
string method, Func<TParams, CancellationToken, Task<TResponse>> handler, JsonRpcHandlerOptions options
) => OnRequest(method, handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.OnRequest<TResponse>(
string method, Func<Task<TResponse>> handler, JsonRpcHandlerOptions options
) => OnRequest(method, handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.OnRequest<TResponse>(
string method, Func<CancellationToken, Task<TResponse>> handler, JsonRpcHandlerOptions options
) => OnRequest(method, handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.OnRequest<TParams>(
string method, Func<TParams, Task> handler, JsonRpcHandlerOptions options
) => OnRequest(method, handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.OnRequest<TParams>(
string method, Func<TParams, CancellationToken, Task> handler, JsonRpcHandlerOptions options
) => OnRequest(method, handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.OnRequest<TParams>(
string method, Func<CancellationToken, Task> handler, JsonRpcHandlerOptions options
) => OnRequest<TParams>(method, handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.OnNotification<TParams>(
string method, Action<TParams, CancellationToken> handler, JsonRpcHandlerOptions options
) => OnNotification(method, handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.OnJsonNotification(string method, Action<JToken> handler, JsonRpcHandlerOptions options) =>
OnJsonNotification(method, handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.OnJsonNotification(
string method, Func<JToken, CancellationToken, Task> handler,
JsonRpcHandlerOptions options
) => OnJsonNotification(method, handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.OnJsonNotification(
string method, Func<JToken, Task> handler,
JsonRpcHandlerOptions options
) => OnJsonNotification(method, handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.OnJsonNotification(
string method, Action<JToken, CancellationToken> handler,
JsonRpcHandlerOptions options
) => OnJsonNotification(method, handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.OnNotification<TParams>(
string method, Action<TParams> handler,
JsonRpcHandlerOptions options
) => OnNotification(method, handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.OnNotification<TParams>(
string method, Func<TParams, CancellationToken, Task> handler,
JsonRpcHandlerOptions options
) => OnNotification(method, handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.OnNotification<TParams>(
string method, Func<TParams, Task> handler,
JsonRpcHandlerOptions options
) => OnNotification(method, handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.OnNotification(string method, Action handler, JsonRpcHandlerOptions options) =>
OnNotification(method, handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.OnNotification(
string method, Func<CancellationToken, Task> handler,
JsonRpcHandlerOptions options
) => OnNotification(method, handler, options);
IDebugAdapterServerRegistry IJsonRpcHandlerRegistry<IDebugAdapterServerRegistry>.OnNotification(string method, Func<Task> handler, JsonRpcHandlerOptions options) =>
OnNotification(method, handler, options);
}
}