using System.Text.Json;
using System.Text.Json.Serialization;
namespace XFEWarframe.Client;
public sealed record GameInstallation(string Directory, string Version, string Source);
public sealed record SignatureResult(string Name, int Expected, int Found, int[] Rvas, string Detail, bool Required = true);
public sealed class CompatibilityReport
{
public string Executable { get; set; } = "";
public string Version { get; set; } = "";
public string Sha256 { get; set; } = "";
public string Profile { get; set; } = "modern-x64-v1";
public string ValidationScope { get; set; } = "static-signatures";
public bool Compatible { get; set; }
public bool ExperimentalMultiAbilities { get; set; }
public bool ExperimentalLua { get; set; }
public bool ExperimentalFetch { get; set; }
public bool ExperimentalCardRendering { get; set; }
public bool AirSlideHeavyAttacks { get; set; }
public List<SignatureResult> Checks { get; set; } = [];
public Dictionary<string, int> Addresses { get; set; } = [];
public Dictionary<string, string> Prologues { get; set; } = [];
public List<string> Problems { get; set; } = [];
public List<string> Warnings { get; set; } = [];
}
public sealed class ClientConfiguration
{
public string Language { get; set; } = "zh";
public bool DirectX12 { get; set; }
public bool RestoreAirSlideHeavyAttacks { get; set; } = true;
public int SchemaVersion { get; set; } = 1;
public bool EnableGameTestControl { get; set; }
public string ServerUrl { get; set; } = "http://127.0.0.1:8444";
public string GameServerUrl { get; set; } = "";
public string ServerName { get; set; } = "XFEWarframe";
public string BuildLabel { get; set; } = "";
public string GameSha256 { get; set; } = "";
public string InstallationId { get; set; } = "";
public Dictionary<string, int> Addresses { get; set; } = [];
public Dictionary<string, string> Prologues { get; set; } = [];
}
public sealed class PayloadManifest
{
public int SchemaVersion { get; set; } = 1;
public string Version { get; set; } = "1.0.0";
public string Sha256 { get; set; } = "";
}
public sealed record BackupEntry(string FileName, string BackupName, string Sha256);
public sealed class InstallationState
{
public int SchemaVersion { get; set; } = 1;
public string Version { get; set; } = "";
public string GameSha256 { get; set; } = "";
public Dictionary<string, string> Files { get; set; } = [];
public List<BackupEntry> LegacyFiles { get; set; } = [];
public DateTimeOffset InstalledAt { get; set; }
}
public sealed class PlayerSettings
{
public string GameDirectory { get; set; } = "";
public string ServerUrl { get; set; } = "http://127.0.0.1:8444";
}
public sealed record FileChange(string Path, string? Backup, string? BeforeHash, string? AfterHash);
public sealed class TransactionJournal
{
public int SchemaVersion { get; set; } = 1;
public List<FileChange> Changes { get; set; } = [];
}
[JsonSourceGenerationOptions(WriteIndented = true, PropertyNameCaseInsensitive = true)]
[JsonSerializable(typeof(CompatibilityReport))]
[JsonSerializable(typeof(ClientConfiguration))]
[JsonSerializable(typeof(GameExitRecord))]
[JsonSerializable(typeof(ServerDescription))]
[JsonSerializable(typeof(PayloadManifest))]
[JsonSerializable(typeof(InstallationState))]
[JsonSerializable(typeof(PlayerSettings))]
[JsonSerializable(typeof(TransactionJournal))]
[JsonSerializable(typeof(List<GameInstallation>))]
public partial class ClientJson : JsonSerializerContext;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace XFEWarframe.Client;
public sealed record GameInstallation(string Directory, string Version, string Source);
public sealed record SignatureResult(string Name, int Expected, int Found, int[] Rvas, string Detail, bool Required = true);
public sealed class CompatibilityReport
{
public string Executable { get; set; } = "";
public string Version { get; set; } = "";
public string Sha256 { get; set; } = "";
public string Profile { get; set; } = "modern-x64-v1";
public string ValidationScope { get; set; } = "static-signatures";
public bool Compatible { get; set; }
public bool ExperimentalMultiAbilities { get; set; }
public bool ExperimentalLua { get; set; }
public bool ExperimentalFetch { get; set; }
public bool ExperimentalCardRendering { get; set; }
public bool AirSlideHeavyAttacks { get; set; }
public List<SignatureResult> Checks { get; set; } = [];
public Dictionary<string, int> Addresses { get; set; } = [];
public Dictionary<string, string> Prologues { get; set; } = [];
public List<string> Problems { get; set; } = [];
public List<string> Warnings { get; set; } = [];
}
public sealed class ClientConfiguration
{
public string Language { get; set; } = "zh";
public bool DirectX12 { get; set; }
public bool RestoreAirSlideHeavyAttacks { get; set; } = true;
public int SchemaVersion { get; set; } = 1;
public bool EnableGameTestControl { get; set; }
public string ServerUrl { get; set; } = "http://127.0.0.1:8444";
public string GameServerUrl { get; set; } = "";
public string ServerName { get; set; } = "XFEWarframe";
public string BuildLabel { get; set; } = "";
public string GameSha256 { get; set; } = "";
public string InstallationId { get; set; } = "";
public Dictionary<string, int> Addresses { get; set; } = [];
public Dictionary<string, string> Prologues { get; set; } = [];
}
public sealed class PayloadManifest
{
public int SchemaVersion { get; set; } = 1;
public string Version { get; set; } = "1.0.0";
public string Sha256 { get; set; } = "";
}
public sealed record BackupEntry(string FileName, string BackupName, string Sha256);
public sealed class InstallationState
{
public int SchemaVersion { get; set; } = 1;
public string Version { get; set; } = "";
public string GameSha256 { get; set; } = "";
public Dictionary<string, string> Files { get; set; } = [];
public List<BackupEntry> LegacyFiles { get; set; } = [];
public DateTimeOffset InstalledAt { get; set; }
}
public sealed class PlayerSettings
{
public string GameDirectory { get; set; } = "";
public string ServerUrl { get; set; } = "http://127.0.0.1:8444";
}
public sealed record FileChange(string Path, string? Backup, string? BeforeHash, string? AfterHash);
public sealed class TransactionJournal
{
public int SchemaVersion { get; set; } = 1;
public List<FileChange> Changes { get; set; } = [];
}
[JsonSourceGenerationOptions(WriteIndented = true, PropertyNameCaseInsensitive = true)]
[JsonSerializable(typeof(CompatibilityReport))]
[JsonSerializable(typeof(ClientConfiguration))]
[JsonSerializable(typeof(GameExitRecord))]
[JsonSerializable(typeof(ServerDescription))]
[JsonSerializable(typeof(PayloadManifest))]
[JsonSerializable(typeof(InstallationState))]
[JsonSerializable(typeof(PlayerSettings))]
[JsonSerializable(typeof(TransactionJournal))]
[JsonSerializable(typeof(List<GameInstallation>))]
public partial class ClientJson : JsonSerializerContext;