mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 00:39:00 +08:00
- 定义了 Godot 源代码生成器的诊断规则表格 - 添加了上下文获取生成器的全面单元测试 - 实现了自动生成行为和注册导出集合的诊断功能 - 配置了全局 using 语句简化代码生成器实现 - 添加了完整的分析器发布跟踪文档记录新规则
20 lines
710 B
C#
20 lines
710 B
C#
namespace GFramework.Godot.SourceGenerators.Abstractions;
|
|
|
|
/// <summary>
|
|
/// 声明导出集合应当转发到哪个注册器成员及其方法。
|
|
/// </summary>
|
|
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, Inherited = false, AllowMultiple = false)]
|
|
public sealed class RegisterExportedCollectionAttribute(string registryMemberName, string registerMethodName)
|
|
: Attribute
|
|
{
|
|
/// <summary>
|
|
/// 获取注册器字段或属性名称。
|
|
/// </summary>
|
|
public string RegistryMemberName { get; } = registryMemberName;
|
|
|
|
/// <summary>
|
|
/// 获取注册方法名称。
|
|
/// </summary>
|
|
public string RegisterMethodName { get; } = registerMethodName;
|
|
}
|