From 4c8e9be695ed87ed3dd7e113f9e72392accc6abf Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Fri, 5 Dec 2025 23:37:53 +0100 Subject: [PATCH] Add synchronous InvokeRecAction method Added a synchronous version of the `InvokeRecAction` method to the `ReC.Client` namespace in `ReCClient.cs`. This method invokes the `POST api/RecAction/invoke/{profileId}` endpoint synchronously using `GetAwaiter().GetResult()` and returns a boolean indicating success. Also included XML documentation comments for the new method, detailing its purpose, parameters, and return value. --- src/ReC.Client/ReCClient.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/ReC.Client/ReCClient.cs b/src/ReC.Client/ReCClient.cs index b87c011..758b2f8 100644 --- a/src/ReC.Client/ReCClient.cs +++ b/src/ReC.Client/ReCClient.cs @@ -30,5 +30,16 @@ namespace ReC.Client var resp = await _http.PostAsync($"api/RecAction/invoke/{profileId}", content: null, cancellationToken); return resp.IsSuccessStatusCode; } + + /// + /// POST api/RecAction/invoke/{profileId} (Synchronous version) + /// + /// + /// True if the request was successful, false otherwise + public bool InvokeRecAction(int profileId) + { + var resp = _http.PostAsync($"api/RecAction/invoke/{profileId}", content: null).GetAwaiter().GetResult(); + return resp.IsSuccessStatusCode; + } } } \ No newline at end of file