From ccbc0269ec9f3de5699c46cc30dc96373e1ca77a Mon Sep 17 00:00:00 2001 From: smolck <46855713+smolck@users.noreply.github.com> Date: Wed, 8 Sep 2021 17:17:28 -0500 Subject: [PATCH] docs(): add docstrings for NvimAPI.cs public members --- src/NvimClient.API/NvimAPI.cs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/NvimClient.API/NvimAPI.cs b/src/NvimClient.API/NvimAPI.cs index a3c34de..088edbf 100644 --- a/src/NvimClient.API/NvimAPI.cs +++ b/src/NvimClient.API/NvimAPI.cs @@ -19,9 +19,19 @@ namespace NvimClient.API { + /// + /// Class encapsulating the Neovim msgpack-rpc API in an idiomatic C# interface. + /// public partial class NvimAPI { + /// + /// Handler for requests from Neovim without a handler registered via + /// public event EventHandler OnUnhandledRequest; + + /// + /// Handler for notifications from Neovim without a handler registered via + /// public event EventHandler OnUnhandledNotification; @@ -130,12 +140,27 @@ public NvimAPI(Stream inputStream, Stream outputStream) StartReceiveLoop(); } + /// + /// Register a handler for the name notification or request. + /// + /// + /// public void RegisterHandler(string name, Func handler) => RegisterHandler(name, (Delegate)handler); + /// + /// Register a handler for the name notification or request. + /// + /// + /// public void RegisterHandler(string name, Action handler) => RegisterHandler(name, (Delegate)handler); + /// + /// Register a handler for the name notification or request. + /// + /// + /// public void RegisterHandler(string name, Func> handler) => RegisterHandler(name, (requestId, args) => @@ -337,6 +362,9 @@ async void Receive() } } + /// + /// Block the current thread while waiting for Neovim to quit. + /// public void WaitForDisconnect() => _waitEvent.WaitOne(); private class PendingRequest