File tree Expand file tree Collapse file tree 1 file changed +2
-18
lines changed
src/ElectronNET.API/Bridge Expand file tree Collapse file tree 1 file changed +2
-18
lines changed Original file line number Diff line number Diff line change 22// ReSharper disable once CheckNamespace
33namespace ElectronNET . API ;
44
5- using ElectronNET . API . Serialization ;
6- using SocketIO . Serializer . SystemTextJson ;
75using System ;
8- using System . Linq ;
9- using System . Text . Json ;
106using System . Threading . Tasks ;
7+ using ElectronNET . API . Serialization ;
8+ using SocketIO . Serializer . SystemTextJson ;
119using SocketIO = SocketIOClient . SocketIO ;
1210
1311internal 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 )
You can’t perform that action at this time.
0 commit comments