mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-23 03:04:29 +08:00
- 移除 IArchitectureExtensible 接口定义 - 更新 Godot 源代码生成器项目配置,添加 Nullable 启用和包路径配置 - 添加 Directory.Build.props 构建属性文件到抽象层项目 - 修复命名空间引用错误和添加 using 语句 - 优化源代码生成器项目的打包配置和依赖引用 - 添加文档注释到 LogAttribute 构造函数 - 更新主项目文件中的源代码生成器相关引用路径 - 从解决方案用户设置中移除过时配置文件 - 添加解决方案用户设置到 gitignore 文件
20 lines
665 B
C#
20 lines
665 B
C#
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;
|
||
} |