mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 00:39:00 +08:00
- 定义了 Godot 源代码生成器的诊断规则表格 - 添加了上下文获取生成器的全面单元测试 - 实现了自动生成行为和注册导出集合的诊断功能 - 配置了全局 using 语句简化代码生成器实现 - 添加了完整的分析器发布跟踪文档记录新规则
14 lines
447 B
C#
14 lines
447 B
C#
namespace GFramework.SourceGenerators.Abstractions.Architectures;
|
|
|
|
/// <summary>
|
|
/// 声明架构模块需要自动注册的模型类型。
|
|
/// </summary>
|
|
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
|
|
public sealed class RegisterModelAttribute(Type modelType) : Attribute
|
|
{
|
|
/// <summary>
|
|
/// 获取要注册的模型类型。
|
|
/// </summary>
|
|
public Type ModelType { get; } = modelType;
|
|
}
|