GeWuYou eb307bf188 feat(generator): 添加代码生成器诊断规则和测试用例
- 定义了 Godot 源代码生成器的诊断规则表格
- 添加了上下文获取生成器的全面单元测试
- 实现了自动生成行为和注册导出集合的诊断功能
- 配置了全局 using 语句简化代码生成器实现
- 添加了完整的分析器发布跟踪文档记录新规则
2026-04-13 10:01:46 +08:00

19 lines
592 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace GFramework.Godot.SourceGenerators.Abstractions;
/// <summary>
/// 标记 UI 页面类型Source Generator 会生成页面行为样板代码。
/// </summary>
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class AutoUiPageAttribute(string key, string layerName) : Attribute
{
/// <summary>
/// 获取 UI 键。
/// </summary>
public string Key { get; } = key;
/// <summary>
/// 获取 <c>UiLayer</c> 枚举成员名称。
/// </summary>
public string LayerName { get; } = layerName;
}