mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 08:44:29 +08:00
- 实现UnifiedSettingsDataRepository统一管理所有设置数据 - 添加JsonSerializer基于Newtonsoft.Json的序列化功能 - 创建SettingsModel管理设置数据生命周期和迁移 - 添加完整的单元测试验证持久化功能 - 实现数据类型注册和批量保存加载功能 - 支持设置数据的版本迁移和事件通知机制
20 lines
515 B
C#
20 lines
515 B
C#
using GFramework.Game.Abstractions.Data;
|
|
using GFramework.Game.Abstractions.Enums;
|
|
|
|
namespace GFramework.Game.Tests.Data;
|
|
|
|
internal sealed record TestDataLocation(
|
|
string Key,
|
|
StorageKinds Kinds = StorageKinds.Local,
|
|
string? Namespace = null,
|
|
IReadOnlyDictionary<string, string>? Metadata = null) : IDataLocation;
|
|
|
|
internal sealed class TestSaveData : IData
|
|
{
|
|
public string Name { get; set; } = string.Empty;
|
|
}
|
|
|
|
internal sealed class TestSimpleData : IData
|
|
{
|
|
public int Value { get; set; }
|
|
} |