Skip to content

Commit 9e9558b

Browse files
committed
SocketIoFacade: Remove unused method
It's not needed for compatibility since SocketIoFacade is internal
1 parent 5f6e4a9 commit 9e9558b

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

src/ElectronNET.API/Bridge/SocketIOFacade.cs

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
// ReSharper disable once CheckNamespace
33
namespace ElectronNET.API;
44

5-
using ElectronNET.API.Serialization;
6-
using SocketIO.Serializer.SystemTextJson;
75
using System;
8-
using System.Linq;
9-
using System.Text.Json;
106
using System.Threading.Tasks;
7+
using ElectronNET.API.Serialization;
8+
using SocketIO.Serializer.SystemTextJson;
119
using SocketIO = SocketIOClient.SocketIO;
1210

1311
internal class SocketIoFacade
@@ -66,20 +64,6 @@ public void On<T>(string eventName, Action<T> action)
6664
}
6765
}
6866

69-
// Keep object overload for compatibility; value will be a JsonElement boxed as object.
70-
public void On(string eventName, Action<object> action)
71-
{
72-
lock (_lockObj)
73-
{
74-
_socket.On(eventName, response =>
75-
{
76-
var value = (object)response.GetValue<JsonElement>();
77-
////Console.WriteLine($"Called Event {eventName} - data {value}");
78-
Task.Run(() => action(value));
79-
});
80-
}
81-
}
82-
8367
public void Once(string eventName, Action action)
8468
{
8569
lock (_lockObj)

0 commit comments

Comments
 (0)