mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
* Renamed shared ICommand to IConsoleCommand. * Lots of refactoring into a shared context. * Removed ICommonSession from server concmd Execute. * Added argStr parameter to concmd execute. * The execute function of client concmds now returns void, use the new shell.RemoteExecuteCommand function to forward commands. # Conflicts: # Robust.Client/Console/Commands/Debug.cs * Finally move shells and commands into shared. * Console commands can now be registered directly without a class in a shared context. * Pulled up ConsoleHost and Console shell into a shared context. * Pulled up half the functions of ConsoleHost into a shared context. * Repair rebase damage. * Make LoadConsoleCommands function not remove any previously registered commands.
42 lines
1.3 KiB
C#
42 lines
1.3 KiB
C#
namespace Robust.Shared.Console
|
|
{
|
|
/// <summary>
|
|
/// Basic interface to handle console commands. Any class implementing this will be
|
|
/// registered with the console system through reflection.
|
|
/// </summary>
|
|
public interface IConsoleCommand
|
|
{
|
|
/// <summary>
|
|
/// Name of the command.
|
|
/// </summary>
|
|
/// <value>
|
|
/// A string as identifier for this command.
|
|
/// </value>
|
|
string Command { get; }
|
|
|
|
/// <summary>
|
|
/// Short description of the command.
|
|
/// </summary>
|
|
/// <value>
|
|
/// String printed as short summary in the "help" command.
|
|
/// </value>
|
|
string Description { get; }
|
|
|
|
/// <summary>
|
|
/// Extended description for the command.
|
|
/// </summary>
|
|
/// <value>
|
|
/// String printed as summary when "help Command" is used.
|
|
/// </value>
|
|
string Help { get; }
|
|
|
|
/// <summary>
|
|
/// Executes the client command.
|
|
/// </summary>
|
|
/// <param name="shell">The console that executed this command.</param>
|
|
/// <param name="argStr">Unparsed text of the complete command with arguments.</param>
|
|
/// <param name="args">An array of all the parsed arguments.</param>
|
|
void Execute(IConsoleShell shell, string argStr, string[] args);
|
|
}
|
|
}
|