#nullable enable
namespace GFramework.Godot.SourceGenerators.Abstractions;
///
/// 显式声明某个 Godot 节点类型与 project.godot 中 AutoLoad 名称之间的映射关系。
///
///
/// 当 AutoLoad 条目无法仅靠类型名唯一推断到 C# 节点类型时,
/// 可以通过该特性为生成器提供稳定的强类型映射入口。
///
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class AutoLoadAttribute : Attribute
{
///
/// 初始化 的新实例。
///
/// 在 project.godot 中声明的 AutoLoad 名称。
///
/// 为 。
///
public AutoLoadAttribute(string name)
{
Name = name ?? throw new ArgumentNullException(nameof(name));
}
///
/// 获取在 project.godot 中声明的 AutoLoad 名称。
///
public string Name { get; }
}