mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-14 05:34:48 +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:
@@ -213,7 +213,6 @@ namespace ElectronNET.API.Entities
|
||||
/// The style of window title bar. Default is default. Possible values are:
|
||||
/// 'default' | 'hidden' | 'hiddenInset' | 'customButtonsOnHover'
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public TitleBarStyle TitleBarStyle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -256,7 +255,6 @@ namespace ElectronNET.API.Entities
|
||||
/// appearance-based, light, dark, titlebar, selection, menu, popover, sidebar,
|
||||
/// medium-light or ultra-dark.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public Vibrancy Vibrancy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace ElectronNET.API.Entities
|
||||
/// <summary>
|
||||
/// The cause of the change
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public enum CookieChangedCause
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -75,7 +75,6 @@ namespace ElectronNET.API.Entities
|
||||
/// `touchScrollStarted`, `pointerDown`, `pointerUp`, `pointerMove`,
|
||||
/// `pointerRawUpdate`, `pointerCancel` or `pointerCausedUaAction`.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public InputEventType Type { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ namespace ElectronNET.API.Entities
|
||||
/// <summary>
|
||||
/// One of the following: "tasks" | "frequent" | "recent" | "custom"
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public JumpListCategoryType Type { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,6 @@ namespace ElectronNET.API.Entities
|
||||
/// <summary>
|
||||
/// One of the following: "task" | "separator" | "file"
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public JumpListItemType Type { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,13 +19,11 @@ namespace ElectronNET.API.Entities
|
||||
/// Define the action of the menu item, when specified the click property will be
|
||||
/// ignored.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public MenuRole Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Can be normal, separator, submenu, checkbox or radio.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public MenuType Type { get; set; }
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ namespace ElectronNET.API.Entities
|
||||
/// displays the same icon as "info", unless you set an icon using the "icon"
|
||||
/// option. On macOS, both "warning" and "error" display the same warning icon.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public MessageBoxType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using ElectronNET.API.Serialization;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
@@ -18,12 +19,12 @@ namespace ElectronNET.API.Entities
|
||||
}
|
||||
|
||||
var scaledImages = value.GetAllScaledImages();
|
||||
JsonSerializer.Serialize(writer, scaledImages, Serialization.ElectronJson.Options);
|
||||
JsonSerializer.Serialize(writer, scaledImages, ElectronJson.Options);
|
||||
}
|
||||
|
||||
public override NativeImage Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||
{
|
||||
var dict = JsonSerializer.Deserialize<Dictionary<float, string>>(ref reader, Serialization.ElectronJson.Options);
|
||||
var dict = JsonSerializer.Deserialize<Dictionary<float, string>>(ref reader, ElectronJson.Options);
|
||||
var newDictionary = new Dictionary<float, Image>();
|
||||
foreach (var item in dict)
|
||||
{
|
||||
|
||||
@@ -13,7 +13,6 @@ namespace ElectronNET.API.Entities
|
||||
/// detach.Defaults to last used dock state.In undocked mode it's possible to dock
|
||||
/// back.In detach mode it's not.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public DevToolsMode Mode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ namespace ElectronNET.API.Entities
|
||||
/// <summary>
|
||||
/// Mode for the progress bar. Can be 'none' | 'normal' | 'indeterminate' | 'error' | 'paused'.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public ProgressBarMode Mode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ namespace ElectronNET.API.Entities
|
||||
/// Scheme of the authentication. Can be basic, digest, ntlm, negotiate.
|
||||
/// Must be provided if removing by origin.
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(JsonStringEnumConverter))]
|
||||
public Scheme Scheme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user