9 Commits

Author SHA1 Message Date
GwWuYou
f87c9cf421 style(csharp): 格式化代码样式和优化代码结构
- 统一调整代码注释的缩进格式,保持文档注释的一致性
- 简化对象初始化语法,移除不必要的参数名称指定
- 优化条件语句结构,移除多余的花括号
- 调整方法实现格式,使用表达式主体语法简化代码
- 标准化代码缩进和空格使用,提升代码可读性
- [skip ci]
2026-01-04 22:14:34 +08:00
GwWuYou
e808a0c365 refactor(generators): 移除枚举扩展生成器中的自动生成标记
- 移除了 IsX 方法中注释的 Auto-generated 前缀
- 移除了 IsIn 方法中注释的 Auto-generated 前缀
- 保持了注释的中文描述内容不变
- 简化了生成代码的注释格式
- [no tag]
2025-12-28 17:21:30 +08:00
GwWuYou
75dfb0a942 refactor(generators): 重构枚举扩展生成器基类实现
- 将 EnumExtensionsGenerator 的基类从 MetadataAttributeClassGeneratorBase 改为 AttributeEnumGeneratorBase
- 修改 AttributeMetadataName 为静态私有字段
- 重写 ResolveAttribute 方法用于解析属性数据
- 更新 ValidateSymbol 方法参数类型为 EnumDeclarationSyntax
- 调整命名空间生成逻辑,简化条件判断
- 重构 AttributeEnumGeneratorBase 基类实现
- 添加 ResolveAttribute 抽象方法用于属性解析
- 改进 Initialize 方法中的语法提供程序逻辑
- 添加 GetHintName 虚方法用于生成文件名提示
2025-12-28 17:13:07 +08:00
GwWuYou
3262e111f4 refactor(generator): 重构源代码生成器基础类和诊断功能
- 为 ValidateSymbol 方法添加 Compilation 参数以支持类型解析
- 实现基于 Compilation 的接口类型验证,替代字符串比较方式
- 添加源代码生成器跟踪诊断功能,便于调试生成过程
- 在 AttributeClassGeneratorBase 中增加详细的执行流程跟踪日志
- 更新诊断描述符配置,添加跟踪信息的诊断支持
- 优化 ContextAwareGenerator 中的接口验证逻辑
2025-12-28 16:17:08 +08:00
GwWuYou
414e49c413 refactor(generators): 重构源代码生成器基类架构
- 将 AttributeClassGeneratorBase 抽象基类拆分为 MetadataAttributeClassGeneratorBase 和 TypeAttributeClassGeneratorBase
- 为 GodotLoggerGenerator 实现 TypeAttributeClassGeneratorBase 基类
- 为 EnumExtensionsGenerator 实现 MetadataAttributeClassGeneratorBase 基类
- 为 LoggerGenerator 实现 TypeAttributeClassGeneratorBase 基类
- 为 ContextAwareGenerator 实现 MetadataAttributeClassGeneratorBase 基类
- 添加 ContextAwareGenerator 中对 IContextAware 接口实现的验证逻辑
- 简化 AttributeClassGeneratorBase 中的语法提供程序实现
- 移除 AttributeClassGeneratorBase 中的异常处理和错误输出逻辑
- 优化属性解析机制,使用元数据名称或类型进行特性查找
2025-12-28 16:08:24 +08:00
GwWuYou
4172952b11 refactor(source-generators): 重构枚举扩展生成器和日志生成器
- 将 EnumExtensionsGenerator 从 IIncrementalGenerator 迁移到 AttributeClassGeneratorBase
- 将 LoggerGenerator 从 IIncrementalGenerator 迁移到 AttributeClassGeneratorBase
- 添加 AttributeEnumGeneratorBase 基类用于枚举相关生成器
- 更新依赖引用路径,使用新的抽象层和通用生成器基类
- 改进代码生成逻辑,使用强类型 Attribute 替代字符串匹配
- 添加详细的 XML 文档注释
- 修改项目目标框架为多版本支持 (net8.0;net9.0;net10.0)
2025-12-28 11:25:24 +08:00
GwWuYou
929ea6b2d6 refactor(godot): 重构源代码生成器依赖结构
- 将CommonDiagnostics移至GFramework.SourceGenerators.Common模块
- 添加PathContests常量类统一管理路径常量
- 更新GodotLoggerGenerator使用新的路径常量和诊断引用
- 修改项目引用以包含GFramework.SourceGenerators.Common依赖
- 更新NuGet包配置以包含Common模块的DLL和XML文档
- 在解决方案文件中添加GFramework.SourceGenerators.Common项目引用
- 为Common模块创建Analyzer发布跟踪文件
2025-12-28 08:54:52 +08:00
GwWuYou
5f55a1b8db refactor(generator): 将Attributes项目重命名为Abstractions并更新引用
- 将GFramework.SourceGenerators.Attributes重命名为GFramework.SourceGenerators.Abstractions
- 将GFramework.Godot.SourceGenerators.Attributes重命名为GFramework.Godot.SourceGenerators.Abstractions
- 更新所有源生成器中对Attribute命名空间的引用
- 修改项目引用从Attributes指向Abstractions
- 添加程序集打包配置到生成项目
- 更新解决方案文件中的项目引用路径
- 修正测试文件中的命名空间引用
2025-12-27 21:29:13 +08:00
GwWuYou
763b460575 refactor(GFramework.Generator): 重构代码生成器结构并添加Godot日志生成器
- 移除原有的LoggerGenerator.cs和相关README文档
- 重命名GFramework.Generator为GFramework.SourceGenerators
- 重命名GFramework.Generator.Attributes为GFramework.SourceGenerators.Attributes
- 添加新的Godot日志生成器(GodotLoggerGenerator)及对应属性(GodotLogAttribute)
- 创建GFramework.Godot.SourceGenerators新项目用于Godot特定功能
- 修改日志生成器使用GodotLoggerFactory而非ConsoleLoggerFactory
2025-12-25 21:10:29 +08:00