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 文件
38 lines
1.0 KiB
C#
38 lines
1.0 KiB
C#
using System;
|
||
|
||
namespace GFramework.Godot.SourceGenerators.Abstractions.logging;
|
||
|
||
/// <summary>
|
||
/// Godot日志特性,用于在类上标记以自动生成日志字段
|
||
/// </summary>
|
||
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
|
||
public sealed class GodotLogAttribute : Attribute
|
||
{
|
||
/// <summary>
|
||
/// 初始化 GodotLogAttribute 类的新实例
|
||
/// </summary>
|
||
public GodotLogAttribute()
|
||
{
|
||
}
|
||
|
||
/// <summary>
|
||
/// 初始化 GodotLogAttribute 类的新实例
|
||
/// </summary>
|
||
/// <param name="name">日志分类名</param>
|
||
public GodotLogAttribute(string? name)
|
||
{
|
||
Name = name;
|
||
}
|
||
|
||
/// <summary>日志分类名(默认使用类名)</summary>
|
||
public string? Name { get; set; }
|
||
|
||
/// <summary>生成字段名</summary>
|
||
public string FieldName { get; set; } = "Logger";
|
||
|
||
/// <summary>是否生成 static 字段</summary>
|
||
public bool IsStatic { get; set; } = true;
|
||
|
||
/// <summary>访问修饰符</summary>
|
||
public string AccessModifier { get; set; } = "private";
|
||
} |