Class ConsoleCommandRegistrarExtensions
- Namespace
- SkyrimForge
- Assembly
- SkyrimForge.dll
Provides extension members for IConsoleCommandRegistrar.
public static class ConsoleCommandRegistrarExtensions
- Inheritance
-
ConsoleCommandRegistrarExtensions
- Inherited Members
Methods
Register(IConsoleCommandRegistrar, string, string?, string, IEnumerable<string>, Action<ObjectReference?, IReadOnlyList<string>>)
Adds a console command.
public static void Register(this IConsoleCommandRegistrar registrar, string name, string? shortName, string help, IEnumerable<string> parameterNames, Action<ObjectReference?, IReadOnlyList<string>> handler)
Parameters
registrarIConsoleCommandRegistrarnamestringThe name the console matches, regardless of case.
shortNamestringA second name the console matches, or null.
helpstringThe text the console's help command shows.
parameterNamesIEnumerable<string>One name per argument. The console passes as many arguments as were entered, up to this count.
handlerAction<ObjectReference?, IReadOnlyList<string>>Runs on the game's thread for a command typed in the console, and on the caller's thread for one run through IConsoleCommands. An exception it throws is written to the plugin's log.
Exceptions
- ArgumentNullException
name,help,parameterNames, orhandlerisnull.- ArgumentException
nameis empty, a name contains white space, or a console or script command already hasnameorshortName.- InvalidOperationException
No disabled entry remains.