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)