using System.Reflection; namespace Dalamud.Game.Command { /// /// This class describes a registered command. /// public sealed class CommandInfo { /// /// The function to be executed when the command is dispatched. /// /// The command itself. /// The arguments supplied to the command, ready for parsing. public delegate void HandlerDelegate(string command, string arguments); /// /// A which will be called when the command is dispatched. /// public HandlerDelegate Handler { get; } /// /// The help message for this command. /// public string HelpMessage { get; set; } = string.Empty; /// /// If this command should be shown in the help output. /// public bool ShowInHelp { get; set; } = true; /// /// Create a new CommandInfo with the provided handler. /// /// public CommandInfo(HandlerDelegate handler) { Handler = handler; LoaderAssemblyName = Assembly.GetCallingAssembly()?.GetName()?.Name; } internal string LoaderAssemblyName { get; set; } = string.Empty; } }