namespace WeaveLoader.API; /// /// Marks a class as a WeaveLoader mod and provides metadata. /// The class must also implement . /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] public sealed class ModAttribute : Attribute { /// /// The unique mod identifier (e.g. "examplemod"). Used as the default namespace /// for content registered by this mod. /// public string Id { get; } /// /// Human-readable display name. /// public string Name { get; set; } = ""; /// /// Semantic version string (e.g. "1.0.0"). /// public string Version { get; set; } = "1.0.0"; /// /// Mod author(s). /// public string Author { get; set; } = ""; /// /// Short description of the mod. /// public string Description { get; set; } = ""; public ModAttribute(string id) { ArgumentException.ThrowIfNullOrWhiteSpace(id); Id = id; } }