This repository was archived by the owner on Dec 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathProxy.cs
75 lines (69 loc) · 2.11 KB
/
Proxy.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
using System;
using System.Collections.Generic;
using System.Text;
namespace LanguageServer.Client
{
/// <summary>
/// The proxy class for sending messages from the server to the client.
/// </summary>
public sealed class Proxy
{
private Connection _connection;
private WindowProxy _window;
private ClientProxy _client;
private WorkspaceProxy _workspace;
private TextDocumentProxy _textDocument;
/// <summary>
/// Initializes a new instance of the <see cref="Proxy"/>.
/// </summary>
/// <param name="connection"></param>
public Proxy(Connection connection)
{
_connection = connection;
}
/// <summary>
/// Gets the proxy object for sending messages related to <c>window</c>.
/// </summary>
public WindowProxy Window
{
get
{
_window = _window ?? new WindowProxy(_connection);
return _window;
}
}
/// <summary>
/// Gets the proxy object for sending messages related to <c>client</c>.
/// </summary>
public ClientProxy Client
{
get
{
_client = _client ?? new ClientProxy(_connection);
return _client;
}
}
/// <summary>
/// Gets the proxy object for sending messages related to <c>workspace</c>.
/// </summary>
public WorkspaceProxy Workspace
{
get
{
_workspace = _workspace ?? new WorkspaceProxy(_connection);
return _workspace;
}
}
/// <summary>
/// Gets the proxy object for sending messages related to <c>textDocument</c>.
/// </summary>
public TextDocumentProxy TextDocument
{
get
{
_textDocument = _textDocument ?? new TextDocumentProxy(_connection);
return _textDocument;
}
}
}
}