From 9e9558b837bd28e4e1b77d41e5caf39ed1a0ebd6 Mon Sep 17 00:00:00 2001 From: softworkz Date: Mon, 17 Nov 2025 13:14:30 +0100 Subject: [PATCH] SocketIoFacade: Remove unused method It's not needed for compatibility since SocketIoFacade is internal --- src/ElectronNET.API/Bridge/SocketIOFacade.cs | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/ElectronNET.API/Bridge/SocketIOFacade.cs b/src/ElectronNET.API/Bridge/SocketIOFacade.cs index 06015a0..4db0a0b 100644 --- a/src/ElectronNET.API/Bridge/SocketIOFacade.cs +++ b/src/ElectronNET.API/Bridge/SocketIOFacade.cs @@ -2,12 +2,10 @@ // ReSharper disable once CheckNamespace namespace ElectronNET.API; +using System; +using System.Threading.Tasks; using ElectronNET.API.Serialization; using SocketIO.Serializer.SystemTextJson; -using System; -using System.Linq; -using System.Text.Json; -using System.Threading.Tasks; using SocketIO = SocketIOClient.SocketIO; internal class SocketIoFacade @@ -66,20 +64,6 @@ internal class SocketIoFacade } } - // Keep object overload for compatibility; value will be a JsonElement boxed as object. - public void On(string eventName, Action action) - { - lock (_lockObj) - { - _socket.On(eventName, response => - { - var value = (object)response.GetValue(); - ////Console.WriteLine($"Called Event {eventName} - data {value}"); - Task.Run(() => action(value)); - }); - } - } - public void Once(string eventName, Action action) { lock (_lockObj)