using System; namespace LANCommander.SDK.Plugins; /// /// Assembly-level attribute that marks an assembly as a LANCommander plugin and declares its /// entry point and compatibility metadata. This is the primary discovery mechanism used by the loader. /// /// /// [assembly: LANCommanderPlugin(typeof(MyPlugin), Id = "com.acme.myplugin", /// MinHostVersion = "1.1.0", Hosts = PluginHost.Server | PluginHost.Launcher)] /// [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)] public sealed class LANCommanderPluginAttribute : Attribute { /// The concrete type implementing that serves as the entry point. public Type EntryPoint { get; } /// Optional override for the plugin id; when null the loader falls back to the instance's . public string? Id { get; set; } /// Minimum compatible host (SDK) version, inclusive. Null means no lower bound. public string? MinHostVersion { get; set; } /// Maximum compatible host (SDK) version, inclusive. Null means no upper bound. public string? MaxHostVersion { get; set; } /// The hosts this plugin supports. Defaults to both server and launcher. public PluginHost Hosts { get; set; } = PluginHost.Server | PluginHost.Launcher; public LANCommanderPluginAttribute(Type entryPoint) { EntryPoint = entryPoint; } }