mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 00:39:00 +08:00
- 实现 ISaveRepository<T> 接口提供存档管理功能 - 添加 SaveRepository<T> 实现类支持槽位存档管理 - 实现数据版本迁移机制支持存档版本升级 - 添加完整的存档测试用例验证功能正确性 - 创建数据与存档系统中文文档说明使用方法 - 移除项目中不再需要的本地计划文件夹配置
35 lines
836 B
C#
35 lines
836 B
C#
using System;
|
|
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 TestVersionedSaveData : IVersionedData
|
|
{
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
public int Level { get; set; }
|
|
|
|
public int Experience { get; set; }
|
|
|
|
public int Version { get; set; } = 3;
|
|
|
|
public DateTime LastModified { get; set; } = DateTime.UtcNow;
|
|
}
|
|
|
|
internal sealed class TestSimpleData : IData
|
|
{
|
|
public int Value { get; set; }
|
|
}
|