mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-04-02 20:09:00 +08:00
- 实现SchemaConfigGenerator源代码生成器 - 支持从JSON schema文件生成配置类型和表包装类 - 添加ConfigSchemaDiagnostics诊断系统 - 集成System.Text.Json包依赖 - 生成强类型的配置访问接口 - 支持多种数据类型包括整数、浮点数、布尔值、字符串和数组 - 实现id字段作为表主键的约束验证 - 添加完整的单元测试和快照验证
56 lines
1.7 KiB
Plaintext
56 lines
1.7 KiB
Plaintext
// <auto-generated />
|
|
#nullable enable
|
|
|
|
namespace GFramework.Game.Config.Generated;
|
|
|
|
/// <summary>
|
|
/// Auto-generated table wrapper for schema file 'monster.schema.json'.
|
|
/// The wrapper keeps generated call sites strongly typed while delegating actual storage to the runtime config table implementation.
|
|
/// </summary>
|
|
public sealed partial class MonsterTable : global::GFramework.Game.Abstractions.Config.IConfigTable<int, MonsterConfig>
|
|
{
|
|
private readonly global::GFramework.Game.Abstractions.Config.IConfigTable<int, MonsterConfig> _inner;
|
|
|
|
/// <summary>
|
|
/// Creates a generated table wrapper around the runtime config table instance.
|
|
/// </summary>
|
|
/// <param name="inner">The runtime config table instance.</param>
|
|
public MonsterTable(global::GFramework.Game.Abstractions.Config.IConfigTable<int, MonsterConfig> inner)
|
|
{
|
|
_inner = inner ?? throw new global::System.ArgumentNullException(nameof(inner));
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public global::System.Type KeyType => _inner.KeyType;
|
|
|
|
/// <inheritdoc />
|
|
public global::System.Type ValueType => _inner.ValueType;
|
|
|
|
/// <inheritdoc />
|
|
public int Count => _inner.Count;
|
|
|
|
/// <inheritdoc />
|
|
public MonsterConfig Get(int key)
|
|
{
|
|
return _inner.Get(key);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public bool TryGet(int key, out MonsterConfig? value)
|
|
{
|
|
return _inner.TryGet(key, out value);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public bool ContainsKey(int key)
|
|
{
|
|
return _inner.ContainsKey(key);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public global::System.Collections.Generic.IReadOnlyCollection<MonsterConfig> All()
|
|
{
|
|
return _inner.All();
|
|
}
|
|
}
|