GeWuYou fb14d7122c docs(style): 更新文档中的命名空间导入格式
- 将所有小写的命名空间导入更正为首字母大写格式
- 统一 GFramework 框架的命名空间引用规范
- 修复 core、ecs、godot 等模块的命名空间导入错误
- 标准化文档示例代码中的 using 语句格式
- 确保所有文档中的命名空间引用保持一致性
- 更新 global using 语句以匹配正确的命名空间格式
2026-03-10 07:18:49 +08:00

35 lines
1.0 KiB
C#

namespace GFramework.SourceGenerators.Abstractions.Bases;
/// <summary>
/// 标记类的优先级,自动生成 <see cref="GFramework.Core.Abstractions.Bases.IPrioritized"/> 接口实现
/// </summary>
/// <remarks>
/// 使用此特性可以避免手动实现 IPrioritized 接口。
/// 优先级值越小,优先级越高(负数表示高优先级)。
/// </remarks>
/// <example>
/// <code>
/// [Priority(10)]
/// public partial class MySystem : AbstractSystem
/// {
/// // 自动生成: public int Priority => 10;
/// }
/// </code>
/// </example>
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class PriorityAttribute : Attribute
{
/// <summary>
/// 初始化 <see cref="PriorityAttribute"/> 类的新实例
/// </summary>
/// <param name="value">优先级值,越小优先级越高</param>
public PriorityAttribute(int value)
{
Value = value;
}
/// <summary>
/// 获取优先级值
/// </summary>
public int Value { get; }
}