mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-14 13:44:47 +00:00
fix: added usings, simplified imports, using JsonElement.Deserialize directly instead of JsonSerializer.Deserialize(JsonElement), removed some unused attributes
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using ElectronNET.API.Serialization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ElectronNET.API
|
||||
@@ -63,7 +65,7 @@ namespace ElectronNET.API
|
||||
|
||||
private static List<object> FormatArguments(System.Text.Json.JsonElement args)
|
||||
{
|
||||
var objectArray = System.Text.Json.JsonSerializer.Deserialize<object[]>(args, Serialization.ElectronJson.Options).ToList();
|
||||
var objectArray = args.Deserialize<object[]>(ElectronJson.Options).ToList();
|
||||
objectArray.RemoveAll(item => item is null);
|
||||
return objectArray;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user