GwWuYou 0126b69c5c refactor(source-generators): 重构源代码生成器项目结构和配置
- 移除 IArchitectureExtensible 接口定义
- 更新 Godot 源代码生成器项目配置,添加 Nullable 启用和包路径配置
- 添加 Directory.Build.props 构建属性文件到抽象层项目
- 修复命名空间引用错误和添加 using 语句
- 优化源代码生成器项目的打包配置和依赖引用
- 添加文档注释到 LogAttribute 构造函数
- 更新主项目文件中的源代码生成器相关引用路径
- 从解决方案用户设置中移除过时配置文件
- 添加解决方案用户设置到 gitignore 文件
2025-12-27 22:18:26 +08:00

20 lines
665 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.

using System;
namespace GFramework.SourceGenerators.Abstractions.enums;
/// <summary>
/// 标注在 enum 上Source Generator 会为该 enum 生成扩展方法。
/// </summary>
[AttributeUsage(AttributeTargets.Enum)]
public sealed class GenerateEnumExtensionsAttribute : Attribute
{
/// <summary>
/// 是否为每个枚举项生成单独的 IsXXX 方法(默认 true
/// </summary>
public bool GenerateIsMethods { get; set; } = true;
/// <summary>
/// 是否生成一个 IsIn(params T[]) 方法以简化多值判断(默认 true
/// </summary>
public bool GenerateIsInMethod { get; set; } = true;
}