Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions src/ElectronNET.API/Bridge/SocketIOFacade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
// ReSharper disable once CheckNamespace
namespace ElectronNET.API;

using ElectronNET.API.Serialization;
using SocketIO.Serializer.SystemTextJson;
using System;
using System.Linq;
using System.Text.Json;
using System.Threading.Tasks;
using ElectronNET.API.Serialization;
using SocketIO.Serializer.SystemTextJson;
using SocketIO = SocketIOClient.SocketIO;

internal class SocketIoFacade
Expand Down Expand Up @@ -66,20 +64,6 @@ public void On<T>(string eventName, Action<T> action)
}
}

// 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)
Expand Down
1 change: 1 addition & 0 deletions src/ElectronNET.ConsoleApp/ElectronNET.ConsoleApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<ImportNuGetBuildTasksPackTargetsFromSdk>false</ImportNuGetBuildTasksPackTargetsFromSdk>
<PublishTrimmed>False</PublishTrimmed>
<NuGetAudit>false</NuGetAudit>
<Nullable>disable</Nullable>
</PropertyGroup>
<PropertyGroup Label="ElectronNetCommon">
<PackageIcon>128.png</PackageIcon>
Expand Down
1 change: 1 addition & 0 deletions src/ElectronNET.WebApp/ElectronNET.WebApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<PropertyGroup>
<TypeScriptCompileOnSaveEnabled>true</TypeScriptCompileOnSaveEnabled>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<Nullable>disable</Nullable>
</PropertyGroup>
<ItemGroup>
<Compile Remove="publish\**" />
Expand Down
1 change: 1 addition & 0 deletions src/ElectronNET/ElectronNET.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<Description>$(DescriptionFirstPart) This package contains the ElectronNET project system.</Description>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<IncludeSymbols>false</IncludeSymbols>
<Nullable>disable</Nullable>
</PropertyGroup>
<ItemGroup>
<None Include="PackageIcon.png" Pack="true" PackagePath="\" />
Expand Down
Loading