mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-04 05:34:51 +00:00
SocketIoFacade: Remove unused method
It's not needed for compatibility since SocketIoFacade is internal
This commit is contained in:
@@ -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<object> action)
|
||||
{
|
||||
lock (_lockObj)
|
||||
{
|
||||
_socket.On(eventName, response =>
|
||||
{
|
||||
var value = (object)response.GetValue<JsonElement>();
|
||||
////Console.WriteLine($"Called Event {eventName} - data {value}");
|
||||
Task.Run(() => action(value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public void Once(string eventName, Action action)
|
||||
{
|
||||
lock (_lockObj)
|
||||
|
||||
Reference in New Issue
Block a user