mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-20 23:54:26 +08:00
Switch serialization to the source-generated System.Text.Json context: add JsonSerializable(typeof(StartupAttemptRecord)) to AppJsonContext and replace the previous JsonSerializerOptions-based Serialize/Deserialize calls with AppJsonContext.Default.StartupAttemptRecord. Also remove the now-unused SerializerOptions field. Additionally, update .gitignore to exclude /test-aot-publish.
43 lines
1.8 KiB
C#
43 lines
1.8 KiB
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
using LanMountainDesktop.Launcher.Models;
|
|
using LanMountainDesktop.Launcher.Services;
|
|
using LanMountainDesktop.Shared.Contracts.Launcher;
|
|
using LanMountainDesktop.Shared.IPC.Abstractions.Services;
|
|
|
|
namespace LanMountainDesktop.Launcher;
|
|
|
|
[JsonSourceGenerationOptions(
|
|
WriteIndented = true,
|
|
PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase,
|
|
PropertyNameCaseInsensitive = true)]
|
|
[JsonSerializable(typeof(SignedFileMap))]
|
|
[JsonSerializable(typeof(UpdateFileEntry))]
|
|
[JsonSerializable(typeof(PlondsUpdateMetadata))]
|
|
[JsonSerializable(typeof(PlondsFileMap))]
|
|
[JsonSerializable(typeof(PlondsComponentEntry))]
|
|
[JsonSerializable(typeof(PlondsFileEntry))]
|
|
[JsonSerializable(typeof(PlondsHashDescriptor))]
|
|
[JsonSerializable(typeof(SnapshotMetadata))]
|
|
[JsonSerializable(typeof(AppVersionInfo))]
|
|
[JsonSerializable(typeof(StartupProgressMessage))]
|
|
[JsonSerializable(typeof(LauncherCoordinatorRequest))]
|
|
[JsonSerializable(typeof(LauncherCoordinatorResponse))]
|
|
[JsonSerializable(typeof(LauncherCoordinatorStatus))]
|
|
[JsonSerializable(typeof(PublicShellStatus))]
|
|
[JsonSerializable(typeof(PublicTrayStatus))]
|
|
[JsonSerializable(typeof(PublicTaskbarStatus))]
|
|
[JsonSerializable(typeof(PublicShellActivationResult))]
|
|
[JsonSerializable(typeof(LauncherResult))]
|
|
[JsonSerializable(typeof(HostDiscoveryConfig))]
|
|
[JsonSerializable(typeof(PluginManifest))]
|
|
[JsonSerializable(typeof(PendingUpgrade))]
|
|
[JsonSerializable(typeof(List<PendingUpgrade>))]
|
|
[JsonSerializable(typeof(OobeStateFile))]
|
|
[JsonSerializable(typeof(DataLocationConfig))]
|
|
[JsonSerializable(typeof(GitHubRelease))]
|
|
[JsonSerializable(typeof(GitHubAsset))]
|
|
[JsonSerializable(typeof(List<GitHubRelease>))]
|
|
[JsonSerializable(typeof(StartupAttemptRecord))]
|
|
internal sealed partial class AppJsonContext : JsonSerializerContext;
|